public void Visit(IsvoidExprContext parserRule, IObjectContext <IVar, IVar> context) { Visit(parserRule.expresion, context); if (!globalContext.IfDefineType(parserRule.expresion.computedType.Name)) { parserRule.computedType = globalContext.Undefined; } else { parserRule.computedType = globalContext.Bool; } }
public IHolderCil Visit(IsvoidExprContext parserRule, IFunctionCil cilTree, IContextCil contextCil) { var value = new LocalCil($"_value{cilTree.LocalCils.Count}"); cilTree.LocalCils.Add(value); var valueExpr = Visit(parserRule.expresion, cilTree, contextCil); var TypeValue = new LocalCil($"_TypeValue{cilTree.LocalCils.Count}"); cilTree.LocalCils.Add(TypeValue); cilTree.ThreeDirInses.Add(new TypeOf(TypeValue, valueExpr)); cilTree.ThreeDirInses.Add(new EqualCil(value, TypeValue, CilAst.GetTypeCilByName("void"))); return(CreateABasicTypeWhitVal(cilTree, CilAst.Bool, value)); }