summary refs log tree commit diff stats
path: root/compiler/semgnrc.nim
Commit message (Expand)AuthorAgeFilesLines
...
* Merge branch 'devel' into araqAndreas Rumpf2017-11-071-0/+2
|\
| * minor breaking change: for loop bodies now get their own scopeAndreas Rumpf2017-11-051-0/+2
* | wipAndreas Rumpf2017-11-021-1/+1
|/
* first implementation of the 'func' keywordAndreas Rumpf2017-09-231-3/+3
* .pure enums are much more convenient to use nowAndreas Rumpf2017-09-171-0/+4
* introduce a pre-processing pass for the concept bodiesZahary Karadjov2017-06-201-3/+10
* fixes #5597; wrong eager template instantiation in generic context (#5601)Andreas Rumpf2017-03-241-3/+3
* make tests green againAndreas Rumpf2017-03-021-0/+8
* fixes #5419Andreas Rumpf2017-02-241-1/+5
* More progress towards a working #3691.Dominik Picheta2017-02-031-6/+4
* WIP: `as` with generics.Dominik Picheta2017-02-021-1/+10
* recursive modules are only detected to improve error messagesAndreas Rumpf2016-11-241-2/+2
* fixes #4600Andreas Rumpf2016-08-231-6/+7
* fixes #4555Andreas Rumpf2016-08-021-1/+1
* compiler almost free of deprecated expr/stmt namesAndreas Rumpf2016-07-301-2/+2
* stdlib and compiler don't use .immediate anymoreAndreas Rumpf2016-07-291-3/+6
* fixes #2377Andreas Rumpf2016-07-081-1/+6
* fixes a critical bug about template instantiations in genericsAndreas Rumpf2016-06-051-2/+2
* first implementation of the new lambda-lifting pass; barely anything worksAndreas Rumpf2015-12-261-2/+2
* fixes regression: NimForum compiles againAraq2015-09-211-8/+2
* fixes #3268Araq2015-09-181-1/+1
* fixes #3329Araq2015-09-181-1/+1
* fixes the most pressing regressions introduced by the new handling of a[i] in...Araq2015-09-161-6/+28
* first attempt to fix 'a[i]' handling in genericsAraq2015-09-121-0/+23
* fixes #1965Araq2015-08-101-2/+2
* breaking change: symbol lookups in generics follows spec more closely; fixes ...Araq2015-08-071-61/+63
* interpret `tuple` as a class and `tuple[]` as the empty tupleMax Zerzouri2015-03-061-1/+1
* Fix documentations for declared (instead of defined)def2015-02-181-1/+1
* nimsuggest improvementsAraq2015-01-301-14/+38
* Happy new year!Guillaume Gelin2015-01-061-1/+1
* fix #1056Zahary Karadjov2014-12-311-1/+2
* fix #1789 (binding to static params during generic proc sigmatch)Zahary Karadjov2014-12-311-1/+7
* fixes #1120Araq2014-12-251-2/+0
* fixes #1039Araq2014-11-281-1/+1
* fixes #1337Araq2014-11-231-13/+22
* fixes #940Araq2014-11-171-1/+1
* 'pretty' command does not exist anymore; improvements for nimfixAraq2014-09-101-14/+31
* fixes #1444Araq2014-08-311-7/+13
* updated the compiler to use the new symbol namesAraq2014-08-281-4/+4
* Nimrod renamed to NimAraq2014-08-281-1/+1
* the big renamefest: first stepsAraq2014-08-221-2/+2
* fixes latest regressionAraq2014-07-111-1/+1
* fixes #1011Araq2014-07-091-3/+34
* Renamed considerAccents to considerQuotedIdentClay Sweetser2014-05-261-2/+2
* Renamed 'considerAcc' to 'considerAccents' for clarityClay Sweetser2014-05-241-2/+2
* compiler prepared for the new comment handlingAraq2014-04-301-0/+1
* propagate semExpr flags in macro/template expansionZahary Karadjov2014-04-061-4/+4
* fixes wrong commitAraq2014-03-221-2/+0
* fixes #1006Araq2014-03-221-0/+2
* split the inline and closure iterators into different symbol kinds for easier...Zahary Karadjov2014-03-061-2/+2
n class="p">.initialize_test_state() Editor_state.filename = 'foo' Editor_state.left = Margin_left Editor_state.right = App.screen.width - Margin_right local old_editor_right = Editor_state.right Text.redraw_all(Editor_state) Log_browser_state = edit.initialize_test_state() -- log browser has some arbitrary margins Log_browser_state.left = 200 + Margin_left Log_browser_state.right = 400 Text.redraw_all(Log_browser_state) log_browser.parse(Log_browser_state) -- display log browser App.wait_fake_time(0.1) App.run_after_keychord('C-l') -- window width is doubled check_eq(App.screen.width, 600, 'F - test_show_log_browser_side_doubles_window_width_if_possible/display:width') -- left side margins are unchanged check_eq(Editor_state.left, Margin_left, 'F - test_show_log_browser_side_doubles_window_width_if_possible/edit:left') check_eq(Editor_state.right, old_editor_right, 'F - test_show_log_browser_side_doubles_window_width_if_possible/edit:right') -- log browser margins are adjusted check_eq(Log_browser_state.left, App.screen.width/2 + Margin_left, 'F - test_show_log_browser_side_doubles_window_width_if_possible/log:left') check_eq(Log_browser_state.right, App.screen.width - Margin_right, 'F - test_show_log_browser_side_doubles_window_width_if_possible/log:right') end function test_show_log_browser_side_resizes_both_sides_if_cannot_double_window_width() io.write('\ntest_show_log_browser_side_resizes_both_sides_if_cannot_double_window_width') -- initialize screen dimensions and indicate that it is maximized App.screen.init{width=300, height=300} Display_width = 300 -- initialize source app with left side occupying more than half the display Current_app = 'source' Editor_state = edit.initialize_test_state() Editor_state.filename = 'foo' Editor_state.left = Margin_left Editor_state.right = 200 Text.redraw_all(Editor_state) Log_browser_state = edit.initialize_test_state() -- log browser has some arbitrary margins Log_browser_state.left = 200 + Margin_left Log_browser_state.right = 400 Text.redraw_all(Log_browser_state) log_browser.parse(Log_browser_state) -- display log browser App.wait_fake_time(0.1) App.run_after_keychord('C-l') -- margins are now adjusted check_eq(Editor_state.left, Margin_left, 'F - test_show_log_browser_side_resizes_both_sides_if_cannot_double_window_width/edit:left') check_eq(Editor_state.right, App.screen.width/2 - Margin_right, 'F - test_show_log_browser_side_resizes_both_sides_if_cannot_double_window_width/edit:right') check_eq(Log_browser_state.left, App.screen.width/2 + Margin_left, 'F - test_show_log_browser_side_resizes_both_sides_if_cannot_double_window_width/log:left') check_eq(Log_browser_state.right, App.screen.width - Margin_right, 'F - test_show_log_browser_side_resizes_both_sides_if_cannot_double_window_width/log:right') end function test_drop_file() io.write('\ntest_drop_file') App.screen.init{width=Editor_state.left+300, height=300} Editor_state = edit.initialize_test_state() App.filesystem['foo'] = 'abc\ndef\nghi\n' local fake_dropped_file = { opened = false, getFilename = function(self) return 'foo' end, open = function(self) self.opened = true end, lines = function(self) assert(self.opened) return App.filesystem['foo']:gmatch('[^\n]+') end, close = function(self) self.opened = false end, } App.filedropped(fake_dropped_file) check_eq(#Editor_state.lines, 3, 'F - test_drop_file/#lines') check_eq(Editor_state.lines[1].data, 'abc', 'F - test_drop_file/lines:1') check_eq(Editor_state.lines[2].data, 'def', 'F - test_drop_file/lines:2') check_eq(Editor_state.lines[3].data, 'ghi', 'F - test_drop_file/lines:3') edit.draw(Editor_state) end function test_drop_file_saves_previous() io.write('\ntest_drop_file_saves_previous') App.screen.init{width=Editor_state.left+300, height=300} -- initially editing a file called foo that hasn't been saved to filesystem yet Editor_state.lines = load_array{'abc', 'def'} Editor_state.filename = 'foo' schedule_save(Editor_state) -- now drag a new file bar from the filesystem App.filesystem['bar'] = 'abc\ndef\nghi\n' local fake_dropped_file = { opened = false, getFilename = function(self) return 'bar' end, open = function(self) self.opened = true end, lines = function(self) assert(self.opened) return App.filesystem['bar']:gmatch('[^\n]+') end, close = function(self) self.opened = false end, } App.filedropped(fake_dropped_file) -- filesystem now contains a file called foo check_eq(App.filesystem['foo'], 'abc\ndef\n', 'F - test_drop_file_saves_previous') end