summary refs log tree commit diff stats
path: root/compiler/lexer.nim
Commit message (Collapse)AuthorAgeFilesLines
* prepare for the enforcement of `std` prefix (#22873)ringabout2023-10-291-2/+4
| | | follow up https://github.com/nim-lang/Nim/pull/22851
* use strictdefs for compiler (#22365)ringabout2023-08-061-7/+11
| | | | | | | | | | | | | | | * wip; use strictdefs for compiler * checkpoint * complete the chores * more fixes * first phase cleanup * Update compiler/bitsets.nim * cleanup
* Remove LineTooLong (#21819)Juan Carlos2023-05-111-5/+0
| | | | | | | * LineTooLong refactor to make it actually useful * Improve error message * changelog wording * Fix typo
* some Token refactors (#21762)metagn2023-05-061-19/+15
| | | | | | | | | | | | | | | * test some Token refactors * fix CI * showcase for more reductions, will revert * Revert "showcase for more reductions, will revert" This reverts commit 5ba48591f4d53e8d83a27de8b03d26c6178dd3d1. * make line and column int32 * remove int32 change
* Implemented basic macro expand functionality (#20579)Ivan Yonchovski2023-01-271-0/+6
| | | | | | | | | | | | | | | | | | * Implemented level based macro expand functionality - it can handle single macro call or expand whole function/proc/etc and it - In addition, I have altered the parser to provide the endInfo for the node. The usefulness of the `endInfo` is not limited to the `expandMacro` functionality but also it is useful for `ideOutline` functionality and I have altered the ideOutline functionality to use `endInfo`. Note `endInfo` most of the time is lost during the AST transformation thus in `nimsuggest.nim` I am using freshly parsed tree to get the location information. * Make sure we stop expanding correctly * Test CI * Fix tv3_outline.nim
* fixes ptr to cstring warnings[backport] (#20848)ringabout2022-11-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix =#13790 ptr char (+friends) should not implicitly convert to cstring * Apply suggestions from code review * first round; compiles on windows * nimPreviewSlimSystem * conversion is unsafe, cast needed * fixes more tests * fixes asyncnet * another try another error * last one * true * one more * why bugs didn't show at once * add `nimPreviewCstringConversion` switch * typo * fixes ptr to cstring warnings[backport] * add fixes Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* refactor strongSpaceB with an enum (#20809)ringabout2022-11-101-17/+20
| | | refactor strongSpaceB
* fixes #15688; handle `strongSpace` overflow issues (#20724)ringabout2022-11-031-7/+9
| | | | | | | * fixes #15688; handle `strongSpace` overflow issues * stop at 1 * change the type of strongSpaceA to bool
* Unicode Operators are no longer experimental (#20444)ringabout2022-09-281-5/+5
| | | | | | | | | * Unicode Operators are no longer experimental * fixes tests * Update doc/manual.md Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* moderate system cleanup & refactor (#20355)metagn2022-09-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * system refactor, move out 600 lines * compilation, slice, backwardsindex, misc_num moved out of system * some procs/types moved into arithmetics, basic_types * system no longer depends on syncio * some procs moved around to fit with their surroundings * make exceptions an import, old ops to misc_num * move instantiationInfo back * move back nim version, fix windows echo * include compilation * better docs for imported modules, fix unsigned ops also remove ze, ze64, toU8, toU16, toU32 with nimPreviewSlimSystem * fix terminal * workaround IC test & weird csize bug, changelog * move NimMajor etc back to compilation, rebase for CI * try ic fix * form single `indices`, slim out TaintedString, try fix IC * fix CI, update changelog, addQuitProc * fix CI * try fix CI * actually fix CI finally hopefully * Update lib/system/compilation.nim Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com> * update kochdocs * hopefully fix csize uses for slimsystem * fix tquit Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* use arrow precedence in spec (#20166)metagn2022-09-061-1/+1
| | | | | | | * test using arrow precedence in spec refs #8759 * add test for #8759
* move formatfloat out of system (#20195)ringabout2022-08-241-1/+1
| | | | | | | | | | | | | | | * move formatfloat out of system * fixes doc * Update changelog.md * careless * fixes * deprecate system/formatfloat * better handling
* move assertions out of system (#19599)flywind2022-03-231-0/+3
|
* fix wrong name (rnimsyn => renderer; pnimsyn => parser; scanner => lexer) ↵flywind2021-09-251-2/+2
| | | | | | | (#18895) * fix wrong module name * rephrase more word
* unicode operator bugfixes (#18802)Andreas Rumpf2021-09-041-46/+60
|
* implemented Unicode operators (#18789)Andreas Rumpf2021-09-031-6/+74
| | | | | | | | | | | | | | | * implemented Unicode operators; refs https://github.com/nim-lang/RFCs/issues/388 * bugfix * better test * arguably more elegant implementation * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* [minor]remove unnecessary stringify (#18419)flywind2021-07-021-4/+4
|
* refs #15667 improve invalid indentation errors, report when & where `=` ↵Timothee Cour2021-04-101-0/+1
| | | | | | | | | | | could be missing (#16397) * refs #15667 improve invalid indentation errors * also show line info where = is missing * add test * add more tests
* docgen: render pragmas by default except for a select list (and fix #9074) ↵Timothee Cour2021-04-011-1/+1
| | | | (#17054)
* followup custom literals (#17500)Timothee Cour2021-03-271-14/+11
|
* custom integer literals bugfixes (#17499)Andreas Rumpf2021-03-241-4/+5
| | | | | * custom integer literals bugfixes * make nimsuggest compile again
* custom integer literals (#17489)Andreas Rumpf2021-03-241-178/+170
| | | | | | | * user defined integer literals; refs #17020 * updated renderer.nim * use mlexerutils helper * imported all test cases from https://github.com/nim-lang/Nim/pull/17020 * final grammar updated
* make unary minus part of number literals, refs #17020 (#17488)Andreas Rumpf2021-03-241-32/+55
| | | | * make unary minus part of number literals, refs #17020 * fixes regression
* conservative approach to fix #15184 (#16723)Andrey Makarov2021-01-151-10/+19
|
* Fix typo in lexer.nim (#15876)sherbst2020-11-071-1/+1
|
* Use modern enums in compiler (#15775)cooldome2020-11-021-63/+40
|
* Fix commentOffsetA for doc comments (#15643)Clyybber2020-10-201-1/+1
|
* nimpretty: do not produce 'line too long' messages (#15541)Andreas Rumpf2020-10-101-2/+3
|
* fixes a regressionAraq2020-10-081-0/+1
|
* Big compiler Cleanup (#14777)Clyybber2020-08-281-89/+68
|
* Deprecate oldNewlines, clean out deprecated code from oldNewlines (#14763)Juan Carlos2020-06-231-6/+1
|
* make `from` an operator (#14241)hlaaftana2020-05-081-1/+1
|
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-281-3/+3
| | | | | | | | | | | | | | * Error -> Defect for defects The distinction between Error and Defect is subjective, context-dependent and somewhat arbitrary, so when looking at an exception, it's hard to guess what it is - this happens often when looking at a `raises` list _without_ opening the corresponding definition and digging through layers of inheritance. With the help of a little consistency in naming, it's at least possible to start disentangling the two error types and the standard lib can set a good example here.
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-34/+33
| | | | | | | | | | | | | | | | | | * Cleanup compiler code base * Unify add calls * Unify len invocations * Unify range operators * Fix oversight * Remove {.procvar.} pragma * initCandidate -> newCandidate where reasonable * Unify safeLen calls
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* squashed and merged with develArne Döring2019-08-211-1/+1
|
* nim check, fix #11927, no more empty strings (#11979)Miran2019-08-191-1/+3
|
* minor style changesAraq2019-07-111-1/+1
|
* styleCheck: make the compiler and large parts of the stdlib compatible with ↵Araq2019-07-101-2/+2
| | | | --styleCheck:error
* nim styleChecker: implemented all the missing features (bugfix)Araq2019-07-101-1/+7
|
* nimpretty: code cleanupsAraq2019-07-091-6/+0
|
* [bugfix] fix #11469, new rules for a newline in nimpretty (#11512)Miran2019-06-261-3/+6
| | | | | * [bugfix] fix #11469, new rules for a newline in nimpretty * concatenate two lines if they have the same indentation level
* [other] Improve the "tabs are not allowed" error message (#11554)Kaushal Modi2019-06-201-1/+1
|
* [bugfix] nimpretty: fixes #11468Araq2019-06-131-3/+3
|
* [refactoring] refactor the compiler and stdlib to deprecation warnings (#11419)Arne Döring2019-06-111-6/+6
|
* right shift is now by default sign preserving (#11322)Arne Döring2019-05-291-6/+7
| | | | | | | | | | | * right shift is now by default sign preserving * fix hashString and semfold * enable arithmetic shift right globally for CI * fix typo * remove xxx * use oldShiftRight as flag * apply feedback * add changelog entry
* Enable range checking for unsigned integers (#11313)Oscar Nihlgård2019-05-251-3/+3
| | | | | | * Enable range checking for unsigned integers * Make the tests green
* StringStream and parseJson, parseCfg, parseSql et al for the vm (#10746)Arne Döring2019-02-281-70/+53
|
* fixes a lexer regression for 'nimble check'Araq2019-02-051-3/+4
|
* make the lexer more forgiving so that nim-regex compiles againAraq2019-02-041-11/+17
|