mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-02 12:04:44 +00:00
json code generation works again
This commit is contained in:
@@ -940,8 +940,8 @@ proc createVar(p: var TProc, typ: PType, indirect: bool): PRope =
|
||||
result = putToSeq("0", indirect)
|
||||
of tyFloat..tyFloat128:
|
||||
result = putToSeq("0.0", indirect)
|
||||
of tyRange:
|
||||
result = createVar(p, typ.sons[0], indirect)
|
||||
of tyRange, tyGenericInst:
|
||||
result = createVar(p, lastSon(typ), indirect)
|
||||
of tySet:
|
||||
result = toRope("{}")
|
||||
of tyBool:
|
||||
@@ -979,7 +979,7 @@ proc createVar(p: var TProc, typ: PType, indirect: bool): PRope =
|
||||
of tyVar, tyPtr, tyRef:
|
||||
if mapType(t) == etyBaseIndex: result = putToSeq("[null, 0]", indirect)
|
||||
else: result = putToSeq("null", indirect)
|
||||
of tySequence, tyString, tyCString, tyPointer:
|
||||
of tySequence, tyString, tyCString, tyPointer, tyProc:
|
||||
result = putToSeq("null", indirect)
|
||||
else:
|
||||
internalError("createVar: " & $t.kind)
|
||||
|
||||
@@ -34,7 +34,7 @@ type
|
||||
|
||||
TFileModuleMap = seq[TFileModuleRec]
|
||||
|
||||
var compMods: TFileModuleMap = @ []
|
||||
var compMods: TFileModuleMap = @[]
|
||||
|
||||
proc registerModule(filename: string, module: PSym) =
|
||||
# all compiled modules
|
||||
|
||||
Reference in New Issue
Block a user