Commit Graph

31 Commits

Author SHA1 Message Date
metagn
041098e882 clean up stdlib with --jsbigint64 (#24255)
refs #6978, refs #6752, refs #21613, refs #24234

The `jsNoInt64`, `whenHasBigInt64`, `whenJsNoBigInt64` templates are
replaced with bool constants to use with `when`. Weird that I didn't do
this in the first place.

The `whenJsNoBigInt64` template was also slightly misleading. The first
branch was compiled for both no bigint64 on JS as well as on C/C++. It
seems only `trandom` depended on this by mistake.

The workaround for #6752 added in #6978 to `times` is also removed with
`--jsbigint64:on`, but #24233 was also encountered with this, so this PR
depends on #24234.
2024-10-19 16:40:28 +02:00
metagn
71801c2b8f fix dot calls with resolved symbols in templates (#22076)
* fix dot calls with resolved symbols in templates

* make old code work

* fix custom number literals test

* remove leftover debug marker

* enable "bug 9" test too

* fix renderer, add test for #7085
2023-06-12 06:34:34 +02:00
metagn
b97d603cd0 some test cleanups & category reorganization (#22010)
* clean up some test categories

* mention exact slice issue

* magics into system

* move trangechecks into overflow

* move tmemory to system

* try fix CI

* try fix CI

* final CI fix
2023-06-06 06:54:07 +02:00
metagn
f05387045d int64/uint64 as bigint in JS (#21613)
* int64/uint64 as bigint in JS

* fix CI

* convert to compile option

* fix lie

* smaller diff, changelog entry
2023-04-11 21:20:20 +02:00
ringabout
0b1d1b7886 fixes #15688; handle strongSpace overflow issues (#20724)
* fixes #15688; handle `strongSpace` overflow issues

* stop at 1

* change the type of strongSpaceA to bool
2022-11-03 09:18:09 +01:00
ringabout
a8cc5d1379 Unicode Operators are no longer experimental (#20444)
* Unicode Operators are no longer experimental

* fixes tests

* Update doc/manual.md

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-09-28 22:37:26 +02:00
Andreas Rumpf
5c85e480a6 unicode operator bugfixes (#18802) 2021-09-04 17:49:27 +02:00
Andreas Rumpf
c2b20516d3 implemented Unicode operators (#18789)
* 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>
2021-09-03 17:31:16 +02:00
Timothee Cour
78e2d299df typo: nonexistant => nonexistent (#17918)
* typo: nonexistant => nonexistent

* fix test (ordering differs because of https://github.com/nim-lang/Nim/issues/17910)
2021-05-02 00:26:41 +02:00
Arne Döring
159c06e045 unify tuple expressions (#13793)
* unify tuple expressions

* fix test

* fix test

* apply feedback

* Handle empty tuples

* Fix rendering named unary tuple

* Protect static NimNode against stripping

* Slightly less hacky

* Revert "Slightly less hacky"

This reverts commit 170c5aec0addc029f637afbc948700ca006b7942.

* Slightly less hacky

* Cleanup

* Fix test

* Fix another test

* Add condsym

* Rebase fallout

* changelog: Move from compiler changes to language changes

* Add stricter tests

* Add empty tuple example to doc/astspec

* Fix test

Co-authored-by: Clyybber <darkmine956@gmail.com>
2021-03-30 02:06:51 +02:00
Timothee Cour
bbe4cf4703 followup custom literals (#17500) 2021-03-27 12:03:14 -07:00
Andreas Rumpf
355985ac89 custom integer literals bugfixes (#17499)
* custom integer literals bugfixes

* make nimsuggest compile again
2021-03-24 22:29:42 +01:00
Andreas Rumpf
5f5a92379f custom integer literals (#17489)
* 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
2021-03-24 14:46:19 +01:00
Andreas Rumpf
86af2f7b50 make unary minus part of number literals, refs #17020 (#17488)
* make unary minus part of number literals, refs #17020
* fixes regression
2021-03-24 09:47:11 +01:00
flywind
6d442a40a6 use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
Araq
34815a4697 megatest: make it green on Linux 2018-12-11 21:23:25 +01:00
Arne Döring
1105d03644 require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
Arne Döring
e012eb1001 updated tests to be executed 2018-11-23 11:58:28 +01:00
Oscar Nihlgård
163e9de3c2 Unicode escape in string literals (#9390) 2018-10-17 00:14:22 +02:00
Andreas Rumpf
0926754e68 make tests green again 2018-07-05 15:51:04 +02:00
Vindaar
681d8e0749 Deprecate 'c', 'C' prefix for octal literals, fixes #8082 (#8178)
* deprecate `0c`, `0C` prefix for octal literals

Deprecates the previously allowed syntax of `0c` and `0C` as a prefix for
octal literals to bring the literals in line with the behavior of
`parseOct` from parseutils.

* add `msgKind` arg to `lexMessageLitNum` for deprecation messages

* change literal tests to check all valid integer literals

Also adds the `tinvaligintegerlit3` test to test for the (still)
invalid `0O` prefix.
2018-07-03 01:56:36 +02:00
Hiroki Noda
a85493610c Lexer: do not accept some invalid integer literals (#8089)
* Lexer: do not accept some invalid integer literals

* Use Natural instead of uint, and result variable
2018-06-27 17:07:26 +02:00
Zahary Karadjov
fb27357b62 A minimal patch enabling the new typedesc and static types syntax 2018-06-16 16:46:32 +03:00
Oscar Nihlgård
c69b88688f Combine some of the lexer tests into a single file 2018-06-05 21:05:13 +02:00
Araq
02b78d3f94 make tests green again 2018-05-14 21:38:18 +02:00
Andreas Rumpf
e32bfef5cc make tests green again 2017-11-05 13:02:46 +01:00
Arne Döring
000b8afd26 Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
Parashurama
8ce9739f11 adds support for unicode hexcode in string literals. 2016-06-01 23:36:46 +02:00
Adam Strzelecki
e80465dacf tests: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:04:32 +02:00
patrick dw
69e15ac32f renamed writeln to writeLine in tests 2015-06-19 01:34:34 -05:00
Araq
20b5f31c03 new tester; all tests categorized 2014-01-13 02:10:03 +01:00