示例#1
0
        public void CheckSemantics(Scope scope, Report report, ArrayDecNode node)
        {
            index.CheckSemantics(scope, report);
            if (index.returnType.isError || !index.returnType.Alike(scope.FindType("int")))
            {
                report.Add(Line, CharPositionInLine, string.Format("An array indexer must be int"));
                returnType = scope.FindType("error");
                return;
            }

            declaration = node;
        }
示例#2
0
 public ArrayDecNode(ArrayDecNode n) : base(n)
 {
 }