From 78c0ac54070e860ec0ed8ac0b58658f7ad52227a Mon Sep 17 00:00:00 2001 From: andri lim Date: Thu, 2 Aug 2018 17:56:44 +0700 Subject: fixes #7827, bindSym enhancement (#8499) * bindSym power up, working prototype * update bindSym doc * add bindSym test * fix some typo * fix bindSym doc * get rid of specialops field from vm * add experimental: dynamicBindSym --- lib/core/macros.nim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/core') diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 17178a634..d4e8ada0a 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -382,16 +382,24 @@ type {.deprecated: [TBindSymRule: BindSymRule].} -proc bindSym*(ident: static[string], rule: BindSymRule = brClosed): NimNode {. +proc bindSym*(ident: string | NimNode, rule: BindSymRule = brClosed): NimNode {. magic: "NBindSym", noSideEffect.} ## creates a node that binds `ident` to a symbol node. The bound symbol ## may be an overloaded symbol. + ## if `ident` is a NimNode, it must have nkIdent kind. ## If ``rule == brClosed`` either an ``nkClosedSymChoice`` tree is ## returned or ``nkSym`` if the symbol is not ambiguous. ## If ``rule == brOpen`` either an ``nkOpenSymChoice`` tree is ## returned or ``nkSym`` if the symbol is not ambiguous. ## If ``rule == brForceOpen`` always an ``nkOpenSymChoice`` tree is ## returned even if the symbol is not ambiguous. + ## + ## experimental feature: + ## use {.experimental: "dynamicBindSym".} to activate it + ## if called from template / regular code, `ident` and `rule` must be + ## constant expression / literal value. + ## if called from macros / compile time procs / static blocks, + ## `ident` and `rule` can be VM computed value. proc genSym*(kind: NimSymKind = nskLet; ident = ""): NimNode {. magic: "NGenSym", noSideEffect.} -- cgit 1.4.1-2-gfad0 ackages.yml?h=devel'>stats
path: root/.github/workflows/ci_packages.yml
blob: 2efbb628f262478f7ed089ff478f2f89c377ac7b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67