protected override SyntaxNode VisitArrayLiteralSyntax(ArrayLiteralSyntax pNode) { if (_types.ContainsKey(pNode.TypeNode.Value)) { return(SyntaxFactory.ArrayLiteral(PolyType(pNode.TypeNode), pNode.Size)); } return(base.VisitArrayLiteralSyntax(pNode)); }
protected override void VisitArrayLiteralSyntax(ArrayLiteralSyntax pNode) { if (pNode.Type == SmallTypeCache.Undefined) { CompilerErrors.UndeclaredType(pNode.TypeNode.Value, pNode.Span); } base.VisitArrayLiteralSyntax(pNode); }
public override void Visit(ArrayLiteralSyntax pNode) { if (pNode.Size.Type == SmallType.Undefined) { Compiler.ReportError(CompilerErrorType.UndefinedType, pNode); } else { if (!SmallType.I32.IsAssignableFrom(pNode.Size.Type)) { Compiler.ReportError(CompilerErrorType.TypeMismatch, pNode, SmallType.I32.ToString(), pNode.Size.Type.ToString()); } } base.Visit(pNode); }
protected virtual void VisitArrayLiteralSyntax(ArrayLiteralSyntax pNode) { Visit(pNode.TypeNode); Visit(pNode.Size); }
protected virtual SyntaxNode VisitArrayLiteralSyntax(ArrayLiteralSyntax pNode) { return(SyntaxFactory.ArrayLiteral((TypeSyntax)Visit(pNode.TypeNode), Visit(pNode.Size))); }