summary refs log tree commit diff stats
path: root/compiler/ast.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/ast.nim')
-rwxr-xr-xcompiler/ast.nim13
1 files changed, 12 insertions, 1 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index 6b2681f2a..a1b69bed8 100755
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -227,6 +227,9 @@ type
     sfInnerProc,      # proc is an inner proc
     sfThread,         # proc will run as a thread
                       # variable is a thread variable
+    sfInline          # forced-inline procs
+    sfImmediate,      # macro or template is immediately expanded without
+                      # considering any possible overloads
     sfCompileTime,    # proc can be evaluated at compile time
     sfMerge,          # proc can be merged with itself
     sfDeadCodeElim,   # dead code elimination for the module is turned on
@@ -602,7 +605,8 @@ type
 # the poor naming choices in the standard library.
 
 const 
-  OverloadableSyms* = {skProc, skMethod, skIterator, skConverter, skModule}
+  OverloadableSyms* = {skProc, skMethod, skIterator, skConverter,
+    skModule, skTemplate, skMacro}
 
   GenericTypes*: TTypeKinds = {tyGenericInvokation, tyGenericBody, 
     tyGenericParam}
@@ -790,6 +794,13 @@ proc newNodeI(kind: TNodeKind, info: TLineInfo): PNode =
   result = newNode(kind)
   result.info = info
 
+proc newNode*(kind: TNodeKind, info: TLineInfo, sons: TNodeSeq = @[],
+             typ: PType = nil): PNode =
+  result = newNode(kind)
+  result.info = info
+  result.typ = typ
+  result.sons = sons
+
 proc newNodeIT(kind: TNodeKind, info: TLineInfo, typ: PType): PNode = 
   result = newNode(kind)
   result.info = info