Commit Graph

59 Commits

Author SHA1 Message Date
Danil Yarantsev
56461c280f Change stdlib imports to use std prefix in most examples (#17202) 2021-02-28 13:17:19 -08:00
flywind
a1a18cfe66 use single backtick (#17115) 2021-02-20 03:20:29 -08:00
flywind
823a71380d fix #16103 (#16109) [backport:1.0]
* fix #16103

* docs
2020-11-24 12:37:41 +01:00
Miran
eb2a4961c7 various documentation fixes [backport] (#15422) 2020-09-29 23:43:12 +02:00
Andreas Rumpf
50b6f6996a .noalias annotation; frontend support (#15419)
* .noalias annotation; frontend support

* added .noalias support to Nim; implements https://github.com/nim-lang/RFCs/issues/204
2020-09-28 13:51:39 +02:00
Andreas Rumpf
ccccd30cf6 fixes #15221 (#15230) 2020-08-27 11:25:20 +02:00
Andreas Rumpf
ddff13f01b better strict funcs, WIP (#15199)
* better strict funcs, WIP

* progress
2020-08-18 12:45:22 +02:00
Andreas Rumpf
c5358b0d4b An optimizer for ARC (#14962)
* WIP: an optimizer for ARC
* do not optimize away destructors in 'finally' if unstructured control flow is involved
* optimized the optimizer
* minor code cleanup
* first steps to .cursor inference
* cursor inference: big steps to a working solution
* baby steps
* better .cursor inference
* new feature: expandArc for easy inspection of the AST after ARC transformations
* added topt_cursor test
* adapt tests
* cleanups, make tests green
* optimize common traversal patterns
* moved test case
* fixes .cursor inference so that npeg compiles once again
* cursor inference: more bugfixes

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-07-15 23:00:06 +02:00
Juan Carlos
4f6acf24ff Add jsre (#14870) 2020-07-03 20:13:10 +02:00
Timothee Cour
17d08ff71c close #14284 document semantics for start for re,nre; improve examples (#14483) 2020-05-28 20:43:36 +02:00
Kaushal Modi
a2a3fa1039 Fail quickly if re or nre module is attempted to be compiled with js [backport] (#14341)
Fixes https://github.com/nim-lang/Nim/issues/14338 .
2020-05-14 07:27:57 +02:00
Jacek Sieka
7d6cbf290a Error -> Defect for defects (#13908)
* 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.
2020-04-28 19:56:01 +02:00
hlaaftana
01523b2b58 change some Exceptions to CatchableError or Defect, fixes #10288 (#14069) 2020-04-22 16:49:41 +02:00
Araq
6900da314c make nre compile with --gc:arc 2020-01-26 13:43:02 +01:00
Andreas Rumpf
3ba3307d61 remove deprecated procs (#12535) 2019-11-05 11:05:46 +01:00
Nindaleth
34dbc5699e fix several typos in documentation and comments (#12553) 2019-10-30 09:08:45 +01:00
Federico Ceratto
39290cf88c Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
Miran
9d4190a5cc fixes #11139 (re.nim memory leak) (#11265)
Use the same PCRE function for freeing up the memory as nre.nim does.
2019-05-16 21:06:31 +02:00
Zed
88079a0dee Documentation import fixes (#11070)
* Move asyncdispatch imports below introduction

* Move nre imports below documentation
2019-04-21 09:45:05 +02:00
Araq
eeae88d81e live with the hacks, PCRE's design is crap 2019-03-19 15:49:24 +01:00
Andreas Rumpf
cd9caf09d1 pcre.nim: added pcre_free and removed hacks in nre and re.nim 2019-03-19 12:48:54 +01:00
Araq
647066e378 make the stdlib work with the changed docgen 2019-01-11 22:17:43 +01:00
Flaviu Tamas
c0a47f7e22 Rework nil/option for nre in light of ""==nil
Fixes #9243
2018-12-11 22:15:57 +00:00
Flaviu Tamas
22b3e9df27 Revert 7f49364fd0 for nre 2018-12-11 22:15:02 +00:00
Flaviu Tamas
ebcf9406be Improve nre documentation (fixes #9470) 2018-11-18 20:12:24 -05:00
Araq
895ac5bec4 nre: don't use the deprecated import syntax 2018-10-30 21:58:59 +01:00
Clyybber
2aa7eeda39 actually do ceiling division, not a similar operation
Co-Authored-By: flaviut <tamasflaviu@gmail.com>
2018-10-28 14:34:05 -04:00
Flaviu Tamas
9ca1c2c930 Eliminate floating point arithmatic in nre
Integer division is already hard enough on your CPU, using floating
point here is WAY slower and can just as effectivly be done using
integers. This is important because matchImpl tends to be in the center
of very hot loops (like split()).
2018-10-28 00:53:09 -04:00
Flaviu Tamas
f55580383c Use runnableExamples for example nre code 2018-10-03 16:39:43 -04:00
Flaviu Tamas
a0ac0b9696 Fix option documentation in nre (fixes #9053) 2018-10-01 21:38:56 -04:00
Andreas Rumpf
7f49364fd0 make more tests green 2018-08-13 12:29:03 +02:00
Timothee Cour
4deda6b732 Update nre.nim (#8147) 2018-06-29 02:13:49 -04:00
Andreas Rumpf
22670aad84 make nre compile again 2018-04-29 07:59:03 +02:00
Andreas Rumpf
f64f9e50cc correct comparisons for nil strings/seqs 2018-04-28 15:13:44 +02:00
Andreas Rumpf
b14cc1e3b2 fixes #6631 2017-10-30 14:45:57 +01:00
Andreas Rumpf
f1dab39086 remove old implementation of the roof operator; make tests green again; close #6292 2017-10-29 20:36:07 +01:00
Florent
34a3d40d18 fixes #5444 - nre.findIter keeps searching when no match is possible (#5453) 2017-03-02 11:48:41 +01:00
Andreas Rumpf
d35c561759 fixes #4996 2017-02-05 12:10:57 +01:00
Andreas Rumpf
3715a5ac91 Merge pull request #4814 from scriptum/rpg-pcre-jit
Enable JIT in PCRE to improve regular expressions performance
2016-10-24 19:07:30 +02:00
Pavel Roschin
dbef9f97c2 Remove TODO for PCRE JIT 2016-10-10 02:21:35 +03:00
Pavel Roschin
61755945d2 Enable JIT in PCRE to improve regular expressions performance 2016-09-23 01:13:06 +03:00
Andreas Rumpf
60b187513e stdlib and compiler don't use .immediate anymore 2016-07-29 23:51:01 +02:00
Konstantin Molchanov
41f5b3bf75 Stdlib: nre: Docstring improved. 2016-06-15 15:08:35 +04:00
Andreas Rumpf
99be6dce81 Merge pull request #4157 from flaviut/update-nre-docs
Generate NRE docs for website
2016-06-02 15:30:16 +02:00
Konstantin Molchanov
4006e0b8b7 Stdlib: nre: Add export options
This should make `nre` more user friendly. See https://github.com/nim-lang/Nim/issues/4158
2016-05-27 15:27:35 +04:00
Konstantin Molchanov
4f9b498103 Stdlib: nre: Convenience proc `contains` added. 2016-05-14 09:23:09 +04:00
Flaviu Tamas
4febf2784a Update NRE documentation 2016-05-13 16:43:43 -04:00
Federico Ceratto
d9cb85c2d8 Spellcheck 2016-02-29 11:25:51 +00:00
def
c50b5b62ef Fix a few deprecation warnings 2016-01-25 19:10:37 +01:00
Flaviu Tamas
90292754f5 Fix flaviut/nre#20 2015-06-18 12:44:12 -04:00