public TokenAttribute(string value, OperatorType unaryOp, AstUnaryType unaryType, AstUnaryType unaryPostfix = 0) { Value = value; UnaryOperator = unaryOp; UnaryType = unaryType; UnaryPostfix = unaryPostfix; }
public TokenAttribute(string value, Precedence prec, AstUnaryType unary, AstBinaryType binary) { Value = value; Precedence = prec; UnaryType = unary; BinaryType = binary; }
public TokenAttribute(string value, Precedence prec, OperatorType unaryOp, OperatorType binOp, AstUnaryType unary, AstBinaryType binary) { Value = value; Precedence = prec; UnaryType = unary; BinaryType = binary; UnaryOperator = unaryOp; BinaryOperator = binOp; }
public static string ToSymbol(this AstUnaryType op) { switch (op) { case AstUnaryType.DecreasePrefix: return("$prefix--"); case AstUnaryType.DecreasePostfix: return("$postfix--"); case AstUnaryType.IncreasePrefix: return("$prefix++"); case AstUnaryType.IncreasePostfix: return("$postfix++"); case AstUnaryType.Negate: return("-"); case AstUnaryType.LogNot: return("!"); case AstUnaryType.BitwiseNot: return("~"); default: throw new Exception("invalid unop: " + op); } }
public AstUnary ReadUnary(AstUnaryType type) { return(new AstUnary( ReadSource(), type, ReadExpression())); }
public AstUnary(Source src, AstUnaryType type, AstExpression operand) : base(src) { Type = type; Operand = operand; }
public TokenAttribute(string value, AstUnaryType unaryType) { Value = value; UnaryType = unaryType; }
public TokenAttribute(string value, AstUnaryType unaryType, AstStatementModifier statementModifier) { Value = value; UnaryType = unaryType; StatementModifier = statementModifier; }