From bfbdb1f028a4b3e67932d6467450e53762ecf633 Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 19 Jul 2013 22:22:20 +0200 Subject: refactorings for the eval engine; bugfix: clean templates as accessors --- compiler/pragmas.nim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'compiler/pragmas.nim') diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index 8f3da9f38..bf4f25014 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -24,7 +24,7 @@ const wCompilerProc, wProcVar, wDeprecated, wVarargs, wCompileTime, wMerge, wBorrow, wExtern, wImportCompilerProc, wThread, wImportCpp, wImportObjC, wNoStackFrame, wError, wDiscardable, wNoInit, wDestructor, wCodegenDecl, - wGenSym, wInject, wRaises, wTags} + wGenSym, wInject, wRaises, wTags, wOperator} converterPragmas* = procPragmas methodPragmas* = procPragmas templatePragmas* = {wImmediate, wDeprecated, wError, wGenSym, wInject, wDirty} @@ -34,7 +34,7 @@ const iteratorPragmas* = {FirstCallConv..LastCallConv, wNosideEffect, wSideEffect, wImportc, wExportc, wNodecl, wMagic, wDeprecated, wBorrow, wExtern, wImportcpp, wImportobjc, wError, wDiscardable, wGenSym, wInject, wRaises, - wTags} + wTags, wOperator} exprPragmas* = {wLine} stmtPragmas* = {wChecks, wObjChecks, wFieldChecks, wRangechecks, wBoundchecks, wOverflowchecks, wNilchecks, wAssertions, wWarnings, wHints, @@ -717,6 +717,9 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: int, if sym == nil: invalidPragma(it) of wLine: PragmaLine(c, it) of wRaises, wTags: pragmaRaisesOrTags(c, it) + of wOperator: + if sym == nil: invalidPragma(it) + else: sym.position = expectIntLit(c, it) else: invalidPragma(it) else: invalidPragma(it) else: processNote(c, it) -- cgit 1.4.1-2-gfad0