63 Commits

Author SHA1 Message Date
Jacek Sieka
92ad98f5d8 pegs: get rid of spurious exception effects (#25399)
Pegs raise only their own error, but the forward declaration causes an
unwanted Exception effect

* use strformat which does compile-time analysis of the format string to
avoid exceptions
* also in parsecfg
2026-01-01 01:33:35 +01:00
la.panon.
2ed45eb848 Make loadConfig available from NimScript (#24840)
fixes #24837 

I really wanted to name the variable just `stream` and leave `defer:
...` and `result =...` out, but the compiler says the variable is
redefined, so this is the form.
2025-04-03 15:54:39 +02:00
ringabout
d31cce557b more strictdef fixes for stdlibs (#24535) 2024-12-13 19:06:43 +01:00
c-blake
beeacc86ff Silence several Hint[Performance] warnings (#23003)
With `--mm:arc` one gets the "implicit copy; if possible, rearrange your
program's control flow" `Performance` warnings without these `move`s.
2023-11-29 22:36:47 +01:00
ringabout
4d11d0619d complete std prefixes for stdlib (#22887)
follow up https://github.com/nim-lang/Nim/pull/22851
follow up https://github.com/nim-lang/Nim/pull/22873
2023-10-30 17:03:04 +01:00
Andrey Makarov
a660c17d30 Markdown code blocks migration part 8 (#22478) 2023-08-15 06:27:36 +02:00
flywind
891329cd4b move io out of system (#19442)
* move io out of system

* fix tests

* fix tests

* next step

* rename to syncio

* rename

* fix nimscript

* comma

* fix

* fix parts of errors

* good for now

* fix test
2022-02-02 17:10:11 +01:00
flywind
b1c7c994b0 [std/parsecfg]use runnableExamples (#17868)
* [std/parsecfg]use runnableExamples
* Apply suggestions from code review

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-04-27 10:24:59 +02:00
flywind
68e522ecec Remove confusing <//> (#17830) 2021-04-26 09:04:52 +02:00
Ardek Romak
207bcabdf2 Add a getter for all defined Sections in parsecfg (#15450) 2021-03-28 09:57:40 -07:00
Danil Yarantsev
56461c280f Change stdlib imports to use std prefix in most examples (#17202) 2021-02-28 13:17:19 -08:00
flywind
fcb5cf643c use single backtick (#17181) 2021-02-24 21:47:27 -08:00
flywind
e1e069dd6c use hexchar in stdlib (#16290) 2020-12-17 13:41:05 +01:00
flywind
48d7c40553 fix #16206 (#16207)
* better docs and tests
* a bit better only clean trailing whitespace
2020-12-06 09:50:46 +01:00
flywind
9fa5826d62 minor typo (#16225) 2020-12-02 10:23:38 +08:00
flywind
62eb1312a0 minor improve the docs of parsecfg (#16208) 2020-12-01 21:06:37 +01:00
lihaifeng
3eaacac230 Update parsecfg.nim (#15513)
* Update parsecfg.nim

Returns the specified default value if the specified key value does not exist.

* Update lib/pure/parsecfg.nim

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>

* Update lib/pure/parsecfg.nim

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>

* Update lib/pure/parsecfg.nim

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
2020-10-08 17:17:00 +02:00
Euan
ccb728a7b0 Fix typo for literal [ (#13243)
The literal value for the `tkBracketLe` token was incorrectly set to `]` rather than `[`. I've had a quick glance at the code and it doesn't look like this change will affect anything at all, but I haven't tested yet - let's see if the CI explodes...
2020-01-24 08:42:03 +00:00
Simon Krauter
37e93eab66 parsecfg: retain CRLF line breaks, fixes #12970 (#12971) 2019-12-29 15:39:48 +01:00
Artem V L
049032432c Docstring refined for the getSectionValue() (#12478) [backport] 2019-10-22 18:20:25 +02:00
narimiran
b17ed2ca9c [backport] run nimpretty on parsers 2019-09-30 13:58:08 +02:00
Araq
38bdf1cd7f minor style changes 2019-07-10 23:55:56 +02:00
Jasper Jenkins
71388caf2e remove stdlib case transitions (#11401) 2019-06-05 08:04:29 +02:00
Andreas Rumpf
49e686ab4e fixes #1286; object case transitions are now sound 2019-05-27 21:29:02 +02:00
Andreas Rumpf
e1515b53d1 introduce temporary <//> for 'owned' to get this compile with 0.19 (#11145)
* introduce temporary <//> for 'owned' to get this compile with 0.19
* make newTable[string, owned Node]() compile (but it crashes)
* make sink/owned parameters consistent
* make actiontable test compile again
* VM: support sytem.move; makes tests green
2019-05-02 08:07:09 +02:00
Zed
3b4952da94 Fix header inconsistencies in documentation (#11071) 2019-04-23 08:40:20 +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
c-blake
ea3e32c224 Remove totally unneeded import of hashes. (#10221) 2019-01-07 00:42:49 +01:00
Araq
3b783f7e13 Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
Arne Döring
199018ef2e test can fail because of invalid spec 2018-12-11 21:23:20 +01:00
Araq
b53531ee31 make 'koch web' work again 2018-09-03 20:02:59 +02:00
Araq
bbb0fd4eb7 remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
andri lim
ca0155a458 fixes #6046 parsecfg failed to parse negative int (#6097) 2017-07-14 16:28:39 +02:00
ftsf
eb83ec2685 Remove redundant filestream.close, causes crash (#5907)
File is already being closed by defer: file.close() closing it twice causes crash.
2017-05-29 14:57:49 +02:00
Christopher Dunn
117c983d13 Use writeable file in parsecfg.writeConfig()
Fixes #5816
2017-05-15 09:52:57 -05:00
Anatoly Galiulin
3374bcb373 parsecfg: handle streams and strings when saving or loading configuration (#5554) 2017-04-06 08:10:08 +02:00
lihf8515
89d4574445 Update parsecfg.nim
Value includes double quotation marks.
2016-11-02 11:48:11 +08:00
roose
6cd7143c1c Add dash to SymChars 2016-07-28 07:47:19 +06:00
Andreas Rumpf
1a88c01f92 documentation build cleaned up 2016-05-31 03:04:45 +02:00
lihf8515
42bd3fd953 Update parsecfg.nim 2016-05-02 17:00:58 +08:00
Federico Ceratto
d9cb85c2d8 Spellcheck 2016-02-29 11:25:51 +00:00
Adam Strzelecki
43bddf62dd lib: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:03:56 +02:00
Federico Ceratto
c95f6f117a Fix typos 2015-02-15 16:06:06 +00:00
Araq
d05df2173b Nimrod renamed to Nim 2014-08-28 09:50:51 +02:00
Araq
bf9764e563 several modules changed 2014-08-28 02:21:49 +02:00
Araq
11b6958755 big rename 2014-08-27 23:42:51 +02:00
Dominik Picheta
be616fc432 Fixes #1219. 2014-07-19 13:22:58 +01:00
Araq
e6d17e6273 made large parts of the stdlib gcsafe 2014-04-20 20:01:24 +02:00
Araq
4ed8cec7ca case consistency: niminst 2013-12-29 03:42:20 +01:00
Araq
9c3751a37c case consistency part 5 2013-12-28 00:37:45 +01:00