first version of an PHP codegen
This commit is contained in:
parent
58f6bfb1dc
commit
35567a1eb9
8 changed files with 665 additions and 411 deletions
|
|
@ -116,6 +116,8 @@ proc genEnumInfo(p: PProc, typ: PType, name: Rope) =
|
|||
[name, genTypeInfo(p, typ.sons[0])])
|
||||
|
||||
proc genTypeInfo(p: PProc, typ: PType): Rope =
|
||||
if p.target == targetPHP:
|
||||
return makeJSString(typeToString(typ, preferModuleInfo))
|
||||
let t = typ.skipTypes({tyGenericInst, tyDistinct})
|
||||
result = "NTI$1" % [rope(t.id)]
|
||||
if containsOrIncl(p.g.typeInfoGenerated, t.id): return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue