public override void CheckSemantic(ICompilationLog log, CompilationScope scope) { scope.Add(this); scope.Add(Value); Type = Value.FactType; }
public override void CheckSemantic(ICompilationLog log, CompilationScope scope) { Exp.CheckSemantic(log, scope); Type = Exp.Type; if (Type != typeof(bool)) { log.AddError("The expression must be boolean", Line, Column); } }
public override void CheckSemantic(ICompilationLog log, CompilationScope scope) { base.CheckSemantic(log, scope); if (Type != typeof(bool)) { log.AddError("the type is not float", Line, Column); } }
public override void CheckSemantic(ICompilationLog log, CompilationScope scope) { Left.CheckSemantic(log, scope); Right.CheckSemantic(log, scope); if (Left.Type != Right.Type) { log.AddError("Expression type mismatch at", Line, Column); } Type = Left.Type; }
public override void CheckSemantic(ICompilationLog log, CompilationScope scope) { try { Fact = scope.GetFact(Name); Type = Fact.FactType; } catch (KeyNotFoundException e) { log.AddError("Fact not defined \"" + Name + "\"", Line, Column); } }
public override void CheckSemantic(ICompilationLog log, CompilationScope scope) { base.CheckSemantic(log, scope); switch (Op) { case RelationalOperator.GreaterEqual: case RelationalOperator.LessEqual: case RelationalOperator.Greater: case RelationalOperator.Less: if (Type != typeof(float)) { log.AddError("the type is not float", Line, Column); } break; } }
public override void CheckSemantic(ICompilationLog log, CompilationScope scope) { Exp.CheckSemantic(log, scope); this.Type = Exp.Type; }
public override void CheckSemantic(ICompilationLog log, CompilationScope scope) { Method = scope.GetMethod(Name); Type = typeof(void); }
public override void CheckSemantic(ICompilationLog log, CompilationScope scope) { }
public abstract void CheckSemantic(ICompilationLog log, CompilationScope scope);