Commit Graph

56 Commits

Author SHA1 Message Date
Jacek Sieka b7b5969557
macros: distinct literals (#235) 2024-09-27 17:36:35 +02:00
tersec 1c9190a632
work around pointless copy in isZeroMemory due to https://github.com/nim-lang/Nim/issues/24093 (#233) 2024-09-26 17:49:08 +02:00
tersec e00fea1f6e
fix deprecation warnings from results; deprecate shims/io module; rm deprecated shims/os module (#223) 2024-06-27 11:48:32 +00:00
tersec 72aab089a2
rm deprecated pre-Nim 1.6 shims (#218) 2024-06-10 00:31:18 +00:00
Jacek Sieka a0c085a51f
strformat: compile-time format string parser (backport Nim 2.2) (#216)
https://github.com/nim-lang/Nim/pull/23356
2024-03-13 09:45:09 +01:00
andri lim 5a792e762f
Add push raises to shims/macros module (#212) 2024-02-12 12:20:12 +07:00
tersec 3aa92ab843
mark stew/shims/net as deprecated (#211) 2024-01-20 20:57:08 +00:00
tersec 49ab3c1d59
don't require init on `ValidIpAddress` (#209)
* don't require init on ValidIpAddress

* Update stew/shims/net.nim

Co-authored-by: Jacek Sieka <jacek@status.im>

---------

Co-authored-by: Jacek Sieka <jacek@status.im>
2023-11-08 01:55:31 +00:00
tersec 326ef09a46
remove dead code under Nim 1.6+ (#206) 2023-07-31 21:07:48 +00:00
tersec 7afe7e3c07
deprecate pre-1.6 shims (#205)
* deprecate pre-1.6 shims

* revert stddefects shim deprecation until CI stops testing 1.2
2023-07-15 17:17:27 +00:00
tersec 65ce2203f0
unconditionally pass through std/os and deprecate shim/os (#199) 2023-06-15 14:55:16 +02:00
tersec 607059fe31
rm copy of parseHex() from 1.2+ stdlib; some proc -> func (#197) 2023-06-15 14:21:51 +02:00
tersec d9400ddea0
unconditionally pass through std/atomics and deprecate shim/atomics (#196) 2023-06-10 23:14:12 +02:00
Etan Kissling 7b4c9407f2
add `enumStyle` helper macro (#189)
For serialization and parsing, distinguishing enums with numeric values
from enums with associated strings for each value is useful. This adds
foundational helpers to allow such distinction.
2023-05-26 15:41:13 +03:00
c-blake e18f5a62af
Add API call from a (slight) future 1.6 branch with when guards to (#173)
* Add API call from a (slight) future 1.6 branch with when guards to
deactivate as per claim here

    https://github.com/status-im/nim-codex/pull/346#issuecomment-1432073926

that this (or something very near it) is where it belongs.

* I also cannot find any `shims/parse` import.  See discussion here:
  https://github.com/status-im/nim-stew/pull/173

So, rename module to match upstream Nim stdlib.

If anyone complains, re-create `parse.nim` that simply does import
& re-export parseutils & self-deprecates.
2023-02-21 16:29:07 -05:00
jangko c52569abd5
add {.used.} to stddefects for nim 1.4 and above 2023-02-15 16:18:10 +07:00
jangko f2e58ba4c8
support multiple nim version re. nnkArgList issue 2022-09-22 08:16:32 +07:00
Zahary Karadjov 06621a2fcd
More forgiving recordFields 2022-07-28 19:50:32 +03:00
Miran 2ab76e2cc2
fix warnings encountered with Nim 1.6 (#128)
* fix warnings encountered with Nim 1.6

* Create shims/stddefects.nim with aliases for all defects
2022-07-27 10:10:26 +02:00
Miran d37e77a72b
make it more Nim 1.4+ compatible (#131)
* make it more 1.6-compatible

* these changes are from 1.4 forward
2022-07-26 17:52:59 +00:00
tersec f173efc500
stylecheck: nnkArglist -> nnkArgList (#127)
* stylecheck: nnkArglist -> nnkArgList

* --stylecheck:error iff >= 1.6.0
2022-07-18 11:02:40 +00:00
Zahary Karadjov b87fd80b0f
Add tests for recordFields being used with empty objects 2022-03-03 17:36:28 +02:00
Zahary Karadjov 2f9c61f485
Add hashes.hashAllFields 2021-12-03 13:30:06 +02:00
Zahary Karadjov a98ec09b0b
Add sets.keepItIf 2021-12-03 13:28:59 +02:00
Jacek Sieka 8a405309c6
enable styleCheck:usages (#93) 2021-12-02 16:24:02 +01:00
cheatfate a587b7a8eb Fix generic sandwich problem. 2021-11-09 20:15:15 +02:00
Gabben 04f8150a08
Fix #62 (#75)
* Fix #62

- Supports more than one pragma parameter (return tuple)
- Returns nil if there are zero parameters in the pragma (like std)
2021-02-10 15:10:08 +02:00
Zahary Karadjov 1db43c7234
Add string.add(openarray[char]) (to be optimized later) 2020-09-02 19:59:50 +03:00
Zahary Karadjov 61e0f82858
More descriptive naming 2020-07-08 00:32:28 +03:00
Kim De Mey cf82e2d51d
Remove made up ValueError (#42) 2020-06-09 10:21:28 +02:00
Zahary Karadjov bb2221ba8c
Forgotten changes from the previous commit 2020-06-05 19:19:06 +03:00
Zahary Karadjov c0f884b81b
Add shims/net for forced IP address initialization 2020-06-05 17:05:22 +03:00
Zahary Karadjov a99dafab42
Handle another corner case in recordFields 2020-05-27 11:30:56 +03:00
Zahary Karadjov 4ffd3e1f59
Support type hierarchies in recordFields 2020-05-26 18:56:41 +03:00
Zahary Karadjov cf837b3fb6
Fix a build problem when compiling NBC with json:trace logging 2020-05-25 20:32:29 +03:00
Zahary Karadjov a333eb080f
Add options to storeMacroResults that improve the results in NBC 2020-05-24 00:49:12 +03:00
Zahary Karadjov 9a2a542b9f
Add dumpMacroResults 2020-05-23 20:18:20 +03:00
Zahary Karadjov f003557674
typedParams will now handle parameters with pragmas 2020-05-23 20:12:56 +03:00
Zahary Karadjov a695d9e7bd
Add shims/macros.getCustomPragmaFixed 2020-05-20 13:42:29 +03:00
Zahary Karadjov 3e1fa974a4
Use a simpler recursion in recordFields as it's no longer an iterator 2020-04-09 20:39:02 +03:00
Zahary Karadjov 989c33a82b
Take advantage of fixes in Nim 1.2 2020-03-25 17:52:09 +02:00
Zahary Karadjov 1c4293b3e7
A new fix for newLit
Upstream fix submitted here:
https://github.com/nim-lang/Nim/pull/12542
2019-10-28 14:30:49 +02:00
Zahary Karadjov 2c9ca5dabb recordFields returns more accurate information in nested case objects 2019-10-23 09:36:16 +09:00
Zahary Karadjov 4f685ab7ec
Another useful form of isTuple 2019-08-14 17:29:14 +02:00
Zahary Karadjov 343c2073cc
recordFields have become too heavy-weight to remain an iterator 2019-08-12 17:49:39 +03:00
Alexander Ivanov 06290de0f9
Implement unnamed tuple support 2019-08-08 22:51:25 +03:00
Zahary Karadjov a3df04d701
Add more init procs for tables and macros.genExpr 2019-08-02 15:26:08 +03:00
Zahary Karadjov 2ca2f25af6
hasCustomPragmaFixed supports types with quoted field names 2019-07-31 02:43:35 +03:00
Zahary Karadjov 30e084f76f
Add macros.inspectType 2019-07-31 02:20:49 +03:00
Zahary Karadjov f782f0378f
Add macros.genCode 2019-07-31 02:13:03 +03:00