static ConstantValue CreateConstant(AST.GlobalConstUse expr) { if (expr.Name == QualifiedName.Null) { return(ConstantValue.Null); } if (expr.Name == QualifiedName.True) { return(ConstantValue.True); } if (expr.Name == QualifiedName.False) { return(ConstantValue.False); } return(null); }
BoundExpression BindGlobalConstUse(AST.GlobalConstUse expr) { // translate built-in constants directly if (expr.Name == QualifiedName.True) { return(new BoundLiteral(true)); } if (expr.Name == QualifiedName.False) { return(new BoundLiteral(false)); } if (expr.Name == QualifiedName.Null) { return(new BoundLiteral(null)); } // bind constant return(new BoundGlobalConst(expr.Name.ToString())); }