public override SyntaxNode Visit(WhileSyntax pNode) { using (new MetadataCache.LocalScope()) { return(base.Visit(pNode)); } }
protected override void VisitWhileSyntax(WhileSyntax pNode) { if (!CanCast(pNode.Condition.Type, SmallTypeCache.Boolean)) { CompilerErrors.TypeCastError(pNode.Condition.Type, SmallTypeCache.Boolean, pNode.Condition.Span); } base.VisitWhileSyntax(pNode); }
protected override void VisitWhileSyntax(WhileSyntax pNode) { _locals.AddScope(); Visit(pNode.Condition); using (var iw = Store.AddValue("CanBreak", true)) { _breakCount++; Visit(pNode.Body); _breakCount--; } _locals.RemoveScope(); }
public override void Visit(WhileSyntax pNode) { if (pNode.Condition.Type == SmallType.Undefined) { Compiler.ReportError(CompilerErrorType.UndefinedType, pNode); } else { if (!SmallType.Boolean.IsAssignableFrom(pNode.Condition.Type)) { Compiler.ReportError(CompilerErrorType.TypeMismatch, pNode, SmallType.Boolean.ToString(), pNode.Condition.Type.ToString()); } } base.Visit(pNode); }
protected virtual void VisitWhileSyntax(WhileSyntax pNode) { Visit(pNode.Condition); Visit(pNode.Body); }
protected override void VisitWhileSyntax(WhileSyntax pNode) { TrySetImplicitCastType(pNode.Condition, SmallTypeCache.Boolean); base.VisitWhileSyntax(pNode); }
protected virtual SyntaxNode VisitWhileSyntax(WhileSyntax pNode) { return(SyntaxFactory.While(Visit(pNode.Condition), (BlockSyntax)Visit(pNode.Body))); }