added '..^' and '..<' operators; 'nil' is allowed for 'len'; added plugin system to the compiler

This commit is contained in:
Araq 2015-04-22 11:49:41 +02:00
commit 4be0d16520
10 changed files with 85 additions and 18 deletions

View file

@ -196,4 +196,11 @@ proc magicsAfterOverloadResolution(c: PContext, n: PNode,
result.add newSymNode(createMagic("-", mSubI), n.info)
result.add lenExprB
result.add n.sons[1]
of mPlugin:
let plugin = getPlugin(n[0].sym)
if plugin.isNil:
localError(n.info, "cannot find plugin " & n[0].sym.name.s)
result = n
else:
result = plugin(c, n)
else: result = n