Diff
Not logged in

Differences From Artifact [94ac916389440918]:

To Artifact [bca45e855c0f4664]:


65 65 LexPosition pos = extractPos(t); 66 66 67 67 StrValue typ = cast(StrValue) t.access!StrValue(ValueLayer, "is"); 68 68 if( typ is null ) 69 69 throw genex!RuntimeException(callpos, text(`Invalid AST (no "is" field): `, _v)); 70 70 71 71 foreach(AT; ListOfASTTypes) 72 - if(typ.data == typeid(AT).name.split(".")[$-1].tolower()) 72 + if(typ.data == typeid(AT).name.split(".")[$-1]) 73 73 { 74 74 typeof(AT.tupleof) mems; 75 75 foreach(i,m; mems) 76 76 { 77 77 string name = AT.tupleof[i].stringof.split(".")[$-1]; 78 78 Value vm = t.access!Value(ValueLayer, name); 79 79 if( vm is null ) ................................................................................ 142 142 } 143 143 else 144 144 static if(is(T : AST)) 145 145 { 146 146 assert( typeid(e) == typeid(T), text("abstracted: ", typeid(e), " vs ", typeid(T)) ); 147 147 auto t = new Table; 148 148 t.set("pos", ValueLayer, ast2table(e.pos,rec)); 149 - t.set("is" , ValueLayer, new StrValue(typeid(e).name.split(".")[$-1].tolower())); 149 + t.set("is" , ValueLayer, new StrValue(typeid(e).name.split(".")[$-1])); 150 150 foreach(i,m; e.tupleof) 151 151 static if(is(typeof(m) : AST)) 152 152 t.set(e.tupleof[i].stringof.split(".")[$-1], ValueLayer, rec(m)); 153 153 else 154 154 t.set(e.tupleof[i].stringof.split(".")[$-1], ValueLayer, ast2table(m,rec)); 155 155 return t; 156 156 }