first implementation of the 'func' keyword
This commit is contained in:
parent
2e93bac227
commit
1a61c4d46d
31 changed files with 97 additions and 84 deletions
|
|
@ -1166,6 +1166,9 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext) =
|
|||
of nkProcDef:
|
||||
if renderNoProcDefs notin g.flags: putWithSpace(g, tkProc, "proc")
|
||||
gproc(g, n)
|
||||
of nkFuncDef:
|
||||
if renderNoProcDefs notin g.flags: putWithSpace(g, tkFunc, "func")
|
||||
gproc(g, n)
|
||||
of nkConverterDef:
|
||||
if renderNoProcDefs notin g.flags: putWithSpace(g, tkConverter, "converter")
|
||||
gproc(g, n)
|
||||
|
|
@ -1324,7 +1327,7 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext) =
|
|||
if p.typ == nil or tfImplicitTypeParam notin p.typ.flags:
|
||||
return true
|
||||
return false
|
||||
|
||||
|
||||
if n.hasExplicitParams:
|
||||
put(g, tkBracketLe, "[")
|
||||
gsemicolon(g, n)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue