Microsoft.Fast.AST.ConstDef.Typecheck C# (CSharp) Method

Typecheck() private method

private Typecheck ( FastPgm pgm ) : void
pgm FastPgm
return void
        internal override void Typecheck(FastPgm pgm)
        {
            expr.CalcSort(x => { throw new FastParseException(x.Location, string.Format("unexpected ID '{0}'",x.text)); }, pgm);
            if (!expr.sort.name.text.Equals(this.sort.name.text))
                throw new FastParseException(expr.token.Location, string.Format("wrong sort '{0}' expecting '{1}'", expr.sort.name.text, sort.name.text));
        }