Commit graph

97 commits

Author SHA1 Message Date
flywind
66022423aa
[std/pegs] increase test coverage (#17871) 2021-04-27 11:09:58 +02:00
Danil Yarantsev
56461c280f
Change stdlib imports to use std prefix in most examples (#17202) 2021-02-28 13:17:19 -08:00
Timothee Cour
b9994925f5
remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 (#16918)
* nimNoArrayToCstringConversion deadcode
* nimbabel deadcode
* nimHasalignOf deadcode
* nimvarargstyped deadcode
* nimhygiene deadcode
* nimNewTypedesc deadcode
* nimlocks deadcode
* nimHasCppDefine deadcode
* nimHasRunnableExamples deadcode
* nimHasNilChecks deadcode
* nimSymKind deadcode
* minor macros refactoring
* nimVmEqIdent deadcode
* nimNoNil deadcode
* nimNoZeroTerminator deadcode
* nimHasSymOwnerInMacro deadcode
* nimVmExportFixed deadcode
* nimNewRuntime deadcode
* nimAshr deadcode
* nimUncheckedArrayTyp deadcode
* nimHasTypeof deadcode
* nimErrorProcCanHaveBody deadcode
* nimHasHotCodeReloading deadcode
* nimHasSignatureHashInMacro deadcode
* nimHasDefault deadcode
* nimMacrosSizealignof deadcode
2021-02-17 09:32:36 +01:00
flywind
f140c92409
fix some warnings (#16952) 2021-02-08 13:50:15 +01:00
flywind
e1e069dd6c
use hexchar in stdlib (#16290) 2020-12-17 13:41:05 +01:00
ee7
1e484ed62b
[backport] Docs: Fix broken code-block (#14749)
This commit indents the contents of a `code-block` in `httpclient.nim`
so that it displays correctly. The bug was introduced by 42a64245f8.

I did a quick search for other `code-block`s that are broken in the same
way, but the only other one I found (in `pegs.nim`) is not included in
the generated documentation.
2020-06-22 08:12:50 +02:00
Araq
65c7884a3c fixes #14718 [backport] 2020-06-19 15:02:38 +02:00
solo989
e84e01cb8c
Update pegs.nim to work at compiletime. No range errors. (#13459) 2020-02-27 11:08:57 +01:00
Andreas Rumpf
3ba3307d61 remove deprecated procs (#12535) 2019-11-05 11:05:46 +01:00
narimiran
5732bb41ef [backport] run nimpretty on the remaining files 2019-09-30 13:58:17 +02:00
Andreas Rumpf
58bcf6cd46
fixes #12121 (#12126) 2019-09-05 08:21:01 +02:00
Araq
38bdf1cd7f minor style changes 2019-07-10 23:55:56 +02:00
Andreas Rumpf
49e686ab4e fixes #1286; object case transitions are now sound 2019-05-27 21:29:02 +02:00
Arne Döring
f94ec363ab Allow void macro result (#11286)
* allow void macro result
* add test for void macro result type
2019-05-21 21:31:40 +02:00
Arne Döring
1102b8ac6e StringStream and parseJson, parseCfg, parseSql et al for the vm (#10746) 2019-02-28 22:57:57 +01:00
Araq
3f6168b337 removes deprecated T/P types 2018-11-16 13:27:56 +01:00
Andreas Rumpf
223e92b83a stdlib: documenation updates, the exception names have been changed 2018-10-25 07:42:45 +02:00
gemath
f26ed1d540 Add interpreting event parser proc to pegs module. (#8075)
* Added simple interpreting event parser to pegs module.
* Has side-effects problem.
* Macro solution works.
* First flat callback test works.
* Fixed namespace pollution.
* Added handler for pkChar.
* Replaced event parser test.
* Started extensive docs.
* 'callback' to 'handler' renaming part 1.
* Renaming 'callback' to 'handler' part2, completed comments.
* Fixed exported API pollution.
* Added more event handler hooks, fixed comments.
* Changed event parser addition entry.
* Fixed variable names and comments.
* Enhanced comment.
* Leave handlers are not called for an unsuccessful match.
* The three varieties of back-reference matches are processed in separate
of-clauses now.
* Improved hygiene and (almost) eliminated exports.
* Trying to fix CI test breakage by eliminating export.
* Trying to fix CI test breakage by eliminating exports.
* Re-activated leave handler code execution for unsuccessful matches.
* Eliminated the last export statement (with a funny smelling hack).
* Make sure leave handler code is executed for all unsuccessful matcher
cases.
* Replaced local unicode.`==` with export.
2018-08-24 20:13:37 +02:00
Andreas Rumpf
7f49364fd0 make more tests green 2018-08-13 12:29:03 +02:00
Andreas Rumpf
dae5450947 WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
gemath
db68bbe4f7 Pegs AST read access (#8050)
* Make PEG AST nodes readable from outside the module.

* Added a test module for the pegs stdlib module.

* Edited changelog.

* Renamed ``sons`` iterator to ``items``, added ``pairs``, inlined both.

* Updated entry and moved it to the right category.
2018-06-19 18:13:33 +01:00
data-man
df37796d88 Fixes pegs bugs, continue 2018-05-23 10:23:19 +03:00
data-man
6acbe6fb01 Fixes pegs bugs 2018-05-23 09:45:51 +03:00
Tyler
799674168d Patch the PEG library to work with the JS backend (#7866)
* Added compiler check on transformFile
2018-05-23 05:27:28 +03:00
Andreas Rumpf
6e8d5790c8 pegs: fixes another null accessing bug 2018-05-06 09:00:41 +02:00
Araq
bbb0fd4eb7 remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
Andreas Rumpf
5758ebf02c more fixes for the new string behaviour 2018-04-30 08:53:31 +02:00
Andreas Rumpf
4375dfd9d0 pegs: don't rely on terminating zero 2018-04-29 07:43:11 +02:00
Arne Döring
000b8afd26 Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
Markus F.X.J. Oberhumer
a0f39e0ab4 Ascii character code 127 (DEL) is not printable and must be quoted. (#5984)
This is a follow-up to #5823.
2017-06-15 20:42:23 +02:00
Joey Payne
b1ab82715e Fix modules that import both strutils and unicode
This is only an issue when a proc in both modules that is named the same
is used, such as toLower or toUpper for strings.
2016-07-01 07:37:49 -06:00
Andreas Rumpf
1a88c01f92 documentation build cleaned up 2016-05-31 03:04:45 +02:00
Andreas Rumpf
c02963bcea Pegs: fixes edge case 2016-05-12 01:36:23 +02:00
Hans Raaf
fcfe27a1f8 Added a replace() proc using a callback to pegs.
I was missing a nice way to use pegs with a more specialized replace
functionality. Here my try to create a universal and versatile version
of replace for that.
2016-05-07 17:53:43 +02:00
Dominik Picheta
3892969af4 Merge branch 'devel' 2015-10-27 23:36:00 +01:00
Federico Ceratto
d1bb246c20 Replace "prefix" with "suffix" in endsWith doc 2015-10-23 17:35:55 +01:00
patrick dw
15e7fe787a renamed writeln to writeLine in lib 2015-06-19 01:02:22 -05:00
Araq
1b98d32579 no private deprecated symbols 2015-06-10 11:11:29 +02:00
pdw
d18e18060e lib/pure/p-t - Dropped 'T' from types 2015-06-04 13:18:36 +02:00
Simon Hafner
179a190f67 fixes match on empty peg match, #2354 2015-03-22 21:39:26 +05:00
Araq
c914532c26 fixes #2205 2015-03-07 15:43:35 +01:00
def
aae3c6c8b7 Get rid of deprecation warnings in pegs 2015-01-16 00:23:33 +01:00
Araq
03afbe00b9 minor improvements 2014-12-28 00:52:10 +01:00
Araq
280fa9624c fixes #1496 2014-12-18 14:54:26 +01:00
Araq
c2e04abcfa fixes regression that caused pegs to not compile 2014-11-29 14:08:42 +01:00
Araq
4def86f077 pegs module compiles again 2014-11-28 09:39:23 +01:00
Flaviu Tamas
bc3464ede7 Modify pegs.nim such that no match will return nil
An empty match will return ""
A zero-length match will return nil

Add test cases

Add news information
2014-10-29 17:54:43 -04:00
Araq
cca8887ba0 updated pegs module 2014-08-28 02:26:22 +02:00
Araq
11b6958755 big rename 2014-08-27 23:42:51 +02:00
Araq
dd806cafa0 distinguish between 'defined' and 'declared' 2014-08-11 20:38:28 +02:00