mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
Allow {.doctype.} in Nim 1.6 w/o implementation (#21909)
This commit is contained in:
@@ -52,7 +52,7 @@ const
|
||||
wDeprecated,
|
||||
wPragma, wEmit, wUnroll,
|
||||
wLinearScanEnd, wPatterns, wTrMacros, wEffects, wNoForward, wReorder, wComputedGoto,
|
||||
wExperimental, wThis, wUsed, wInvariant, wAssume, wAssert}
|
||||
wExperimental, wDoctype, wThis, wUsed, wInvariant, wAssume, wAssert}
|
||||
stmtPragmasTopLevel* = {wChecks, wObjChecks, wFieldChecks, wRangeChecks,
|
||||
wBoundChecks, wOverflowChecks, wNilChecks, wStaticBoundchecks,
|
||||
wStyleChecks, wAssertions,
|
||||
@@ -1213,6 +1213,11 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int,
|
||||
if not isTopLevel(c):
|
||||
localError(c.config, n.info, "'experimental' pragma only valid as toplevel statement or in a 'push' environment")
|
||||
processExperimental(c, it)
|
||||
of wDoctype:
|
||||
if not isTopLevel(c):
|
||||
localError(c.config, n.info, "\"doctype\" pragma only valid as top-level statement")
|
||||
message(c.config, it.info, hintUser,
|
||||
"doctype is not really implemented in Nim 1")
|
||||
of wThis:
|
||||
if it.kind in nkPragmaCallKinds and it.len == 2:
|
||||
c.selfName = considerQuotedIdent(c, it[1])
|
||||
|
||||
@@ -80,7 +80,7 @@ type
|
||||
wLocalPassc = "localPassC", wBorrow = "borrow", wDiscardable = "discardable",
|
||||
wFieldChecks = "fieldChecks", wSubsChar = "subschar", wAcyclic = "acyclic",
|
||||
wShallow = "shallow", wUnroll = "unroll", wLinearScanEnd = "linearScanEnd",
|
||||
wComputedGoto = "computedGoto", wExperimental = "experimental",
|
||||
wComputedGoto = "computedGoto", wExperimental = "experimental", wDoctype = "doctype",
|
||||
wWrite = "write", wGensym = "gensym", wInject = "inject", wDirty = "dirty",
|
||||
wInheritable = "inheritable", wThreadVar = "threadvar", wEmit = "emit",
|
||||
wAsmNoStackFrame = "asmNoStackFrame", wImplicitStatic = "implicitStatic",
|
||||
|
||||
Reference in New Issue
Block a user