Files
MicrosoftIris/UIX/ParserYaccClass.cs
T

297 lines
22 KiB
C#
Raw Normal View History

2022-03-03 08:14:05 -06:00
// Decompiled with JetBrains decompiler
// Type: ParserYaccClass
// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11
// Assembly location: C:\Program Files\Zune\UIX.dll
using Microsoft.Iris.Markup;
using Microsoft.Iris.Markup.Validation;
using SSVParseLib;
internal class ParserYaccClass : SSYacc
{
public ParserYaccClass(SSYaccTable q_table, SSLex q_lex)
: base(q_table, q_lex)
{
}
public override SSYaccStackElement reduce(int q_prod, int q_size)
{
switch ((ParserYaccProd)q_prod)
2022-03-03 08:14:05 -06:00
{
case ParserYaccProd.StartCodeBlock:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateCode(Owner, new ValidateStatementCompound(Owner, (ValidateStatement)FromProduction(1), CurrentLine, CurrentColumn), CurrentLine, CurrentColumn));
case ParserYaccProd.StartInlineExpression:
2022-03-03 08:14:05 -06:00
return ReturnObject(FromProduction(2));
case ParserYaccProd.StartMethods:
2022-03-03 08:14:05 -06:00
return ReturnObject(FromProduction(1));
case ParserYaccProd.MethodsEmpty:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateMethodList(Owner, CurrentLine, CurrentColumn));
case ParserYaccProd.Methods:
2022-03-03 08:14:05 -06:00
ValidateMethodList validateMethodList = (ValidateMethodList)FromProduction(0);
ValidateMethod expression1 = (ValidateMethod)FromProduction(1);
validateMethodList.AppendToEnd(expression1);
return ReturnObject(validateMethodList);
case ParserYaccProd.MethodSpecifiersEmpty:
2022-03-03 08:14:05 -06:00
return ReturnObject(new Vector<MethodSpecifier>());
case ParserYaccProd.MethodSpecifiers:
2022-03-03 08:14:05 -06:00
Vector<MethodSpecifier> vector = (Vector<MethodSpecifier>)FromProduction(0);
MethodSpecifier methodSpecifier = (MethodSpecifier)FromProduction(1);
vector.Add(methodSpecifier);
return ReturnObject(vector);
case ParserYaccProd.MethodSpecifierVirtual:
2022-03-03 08:14:05 -06:00
return ReturnObject(MethodSpecifier.Virtual);
case ParserYaccProd.MethodSpecifierOverride:
2022-03-03 08:14:05 -06:00
return ReturnObject(MethodSpecifier.Override);
case ParserYaccProd.Method:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateMethod(true));
case ParserYaccProd.ParameterDefinitionsEmpty:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateParameterDefinitionList(Owner, CurrentLine, CurrentColumn));
case ParserYaccProd.ParameterDefinitions:
2022-03-03 08:14:05 -06:00
return ReturnObject((ValidateParameterDefinitionList)FromProduction(0));
case ParserYaccProd.ParameterDefinitionListSingle:
2022-03-03 08:14:05 -06:00
ValidateParameterDefinition expression2 = (ValidateParameterDefinition)FromProduction(0);
ValidateParameterDefinitionList parameterDefinitionList1 = new ValidateParameterDefinitionList(Owner, expression2.Line, expression2.Column);
parameterDefinitionList1.AppendToEnd(expression2);
return ReturnObject(parameterDefinitionList1);
case ParserYaccProd.ParameterDefinitionListMulti:
2022-03-03 08:14:05 -06:00
ValidateParameterDefinitionList parameterDefinitionList2 = (ValidateParameterDefinitionList)FromProduction(0);
ValidateParameterDefinition expression3 = (ValidateParameterDefinition)FromProduction(2);
parameterDefinitionList2.AppendToEnd(expression3);
return ReturnObject(parameterDefinitionList2);
case ParserYaccProd.ParameterDefinition:
2022-03-03 08:14:05 -06:00
ValidateTypeIdentifier typeIdentifier1 = (ValidateTypeIdentifier)FromProduction(0);
string name = FromTerminal(1);
return ReturnObject(new ValidateParameterDefinition(Owner, Line(1), Column(1), name, typeIdentifier1));
case ParserYaccProd.ExpressionListEmpty:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionList(Owner, CurrentLine, CurrentColumn));
case ParserYaccProd.ExpressionList:
2022-03-03 08:14:05 -06:00
return ReturnObject(FromProduction(0));
case ParserYaccProd.ExpressionsSingle:
2022-03-03 08:14:05 -06:00
ValidateExpression expression4 = (ValidateExpression)FromProduction(0);
ValidateExpressionList validateExpressionList1 = new ValidateExpressionList(Owner, expression4.Line, expression4.Column);
validateExpressionList1.AppendToEnd(expression4);
return ReturnObject(validateExpressionList1);
case ParserYaccProd.ExpressionsMulti:
2022-03-03 08:14:05 -06:00
ValidateExpressionList validateExpressionList2 = (ValidateExpressionList)FromProduction(0);
ValidateExpression expression5 = (ValidateExpression)FromProduction(2);
validateExpressionList2.AppendToEnd(expression5);
return ReturnObject(validateExpressionList2);
case ParserYaccProd.StatementLocalDeclaration:
2022-03-03 08:14:05 -06:00
ValidateTypeIdentifier typeIdentifier2 = (ValidateTypeIdentifier)FromProduction(0);
return ReturnObject(new ValidateStatementScopedLocal(Owner, FromTerminal(1), typeIdentifier2, Line(1), Column(1)));
case ParserYaccProd.StatementLocalAssignment:
2022-03-03 08:14:05 -06:00
ValidateTypeIdentifier typeIdentifier3 = (ValidateTypeIdentifier)FromProduction(0);
string str = FromTerminal(1);
return ReturnObject(new ValidateStatementAssignment(Owner, new ValidateStatementScopedLocal(Owner, str, typeIdentifier3, Line(1), Column(1)), new ValidateExpressionSymbol(Owner, str, Line(1), Column(1)), (ValidateExpression)FromProduction(3), Line(1), Column(1)));
case ParserYaccProd.ForInitializerDecl:
2022-03-03 08:14:05 -06:00
return ReturnObject(FromProduction(0));
case ParserYaccProd.ForInitializerExprList:
2022-03-03 08:14:05 -06:00
ValidateExpressionList validateExpressionList3 = (ValidateExpressionList)FromProduction(0);
return ReturnObject(new ValidateStatementExpression(Owner, validateExpressionList3, validateExpressionList3.Line, validateExpressionList3.Column));
case ParserYaccProd.StatementIf:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateStatementIf(Owner, (ValidateExpression)FromProduction(2), ValidateStatementCompound.Encapsulate((ValidateStatement)FromProduction(4)), Line(0), Column(0)));
case ParserYaccProd.StatementIfElse:
2022-03-03 08:14:05 -06:00
ValidateExpression condition1 = (ValidateExpression)FromProduction(2);
ValidateStatement statement1 = (ValidateStatement)FromProduction(4);
ValidateStatement statement2 = (ValidateStatement)FromProduction(6);
ValidateStatementCompound statementCompoundTrue = ValidateStatementCompound.Encapsulate(statement1);
ValidateStatementCompound statementCompoundFalse = ValidateStatementCompound.Encapsulate(statement2);
return ReturnObject(new ValidateStatementIfElse(Owner, condition1, statementCompoundTrue, statementCompoundFalse, Line(0), Column(0)));
case ParserYaccProd.StatementForEach:
2022-03-03 08:14:05 -06:00
ValidateTypeIdentifier typeIdentifier4 = (ValidateTypeIdentifier)FromProduction(2);
return ReturnObject(new ValidateStatementForEach(Owner, new ValidateStatementScopedLocal(Owner, FromTerminal(3), typeIdentifier4, Line(3), Column(3)), (ValidateExpression)FromProduction(5), ValidateStatementCompound.Encapsulate((ValidateStatement)FromProduction(7)), Line(0), Column(0)));
case ParserYaccProd.StatementWhile:
2022-03-03 08:14:05 -06:00
ValidateExpression condition2 = (ValidateExpression)FromProduction(2);
return ReturnObject(new ValidateStatementWhile(Owner, (ValidateStatement)FromProduction(4), condition2, false, Line(0), Column(0)));
case ParserYaccProd.StatementDoWhile:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateStatementWhile(Owner, (ValidateStatement)FromProduction(1), (ValidateExpression)FromProduction(4), true, Line(0), Column(0)));
case ParserYaccProd.StatementFor:
2022-03-03 08:14:05 -06:00
ValidateStatement statementList1 = (ValidateStatement)FromProduction(2);
ValidateExpression condition3 = (ValidateExpression)FromProduction(4);
ValidateExpression expression6 = (ValidateExpression)FromProduction(6);
ValidateStatement statementList2 = (ValidateStatement)FromProduction(8);
ValidateStatementExpression statementExpression = new ValidateStatementExpression(Owner, expression6, expression6.Line, expression6.Column);
statementList2.AppendToEnd(statementExpression);
ValidateStatementWhile validateStatementWhile = new ValidateStatementWhile(Owner, new ValidateStatementCompound(Owner, statementList2, statementList2.Line, statementList2.Column), condition3, false, Line(0), Column(0));
statementList1.AppendToEnd(validateStatementWhile);
return ReturnObject(new ValidateStatementCompound(Owner, statementList1, Line(0), Column(0)));
case ParserYaccProd.StatementDecl:
2022-03-03 08:14:05 -06:00
return ReturnObject(FromProduction(0));
case ParserYaccProd.StatementExpr:
2022-03-03 08:14:05 -06:00
ValidateExpression expression7 = (ValidateExpression)FromProduction(0);
return ReturnObject(new ValidateStatementExpression(Owner, expression7, expression7.Line, expression7.Column));
case ParserYaccProd.StatementReturn:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateStatementReturn(Owner, null, Line(0), Column(0)));
case ParserYaccProd.StatementReturnExpression:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateStatementReturn(Owner, (ValidateExpression)FromProduction(1), Line(0), Column(0)));
case ParserYaccProd.StatementBreak:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateStatementBreak(Owner, false, Line(0), Column(0)));
case ParserYaccProd.StatementContinue:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateStatementBreak(Owner, true, Line(0), Column(0)));
case ParserYaccProd.StatementAttribute:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateStatementAttribute(Owner, FromTerminal(1), (ValidateParameter)FromProduction(3), Line(1), Column(1)));
case ParserYaccProd.StatementCompound:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateStatementCompound(Owner, (ValidateStatement)FromProduction(1), Line(0), Column(0)));
case ParserYaccProd.StatementsMulti:
2022-03-03 08:14:05 -06:00
ValidateStatement validateStatement1 = (ValidateStatement)FromProduction(0);
ValidateStatement validateStatement2 = (ValidateStatement)FromProduction(1);
if (validateStatement1 != null)
validateStatement1.AppendToEnd(validateStatement2);
else
validateStatement1 = validateStatement2;
return ReturnObject(validateStatement1);
case ParserYaccProd.StatementsEmpty:
2022-03-03 08:14:05 -06:00
return ReturnObject(null);
case ParserYaccProd.ExpressionCallMethod:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionCall(Owner, (ValidateExpression)FromProduction(0), FromTerminal(2), (ValidateParameter)FromProduction(4), Line(2), Column(2)));
case ParserYaccProd.ExpressionCallThisMethod:
2022-03-03 08:14:05 -06:00
string memberName = FromTerminal(0);
ValidateParameter parameterList = (ValidateParameter)FromProduction(2);
return ReturnObject(new ValidateExpressionCall(Owner, new ValidateExpressionThis(Owner, Line(0), Column(0)), memberName, parameterList, Line(0), Column(0)));
case ParserYaccProd.ExpressionCallProperty:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionCall(Owner, (ValidateExpression)FromProduction(0), FromTerminal(2), null, Line(2), Column(2)));
case ParserYaccProd.ExpressionCallStaticProperty:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionCall(Owner, new ValidateTypeIdentifier(Owner, FromTerminal(0), FromTerminal(2), Line(0), Column(0)), FromTerminal(4), null, Line(4), Column(4)));
case ParserYaccProd.ExpressionCallStaticMethod:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionCall(Owner, new ValidateTypeIdentifier(Owner, FromTerminal(0), FromTerminal(2), Line(0), Column(0)), FromTerminal(4), (ValidateParameter)FromProduction(6), Line(4), Column(4)));
case ParserYaccProd.ExpressionIndex:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionIndex(Owner, (ValidateExpression)FromProduction(0), (ValidateParameter)FromProduction(2), Line(1), Column(1)));
case ParserYaccProd.ExpressionNew:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionNew(Owner, (ValidateTypeIdentifier)FromProduction(1), (ValidateParameter)FromProduction(3), Line(0), Column(0)));
case ParserYaccProd.ExpressionSymbol:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionSymbol(Owner, FromTerminal(0), Line(0), Column(0)));
case ParserYaccProd.ExpressionString:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionConstant(Owner, FromTerminalTrim(0, 1, 1), ConstantType.String, Line(0), Column(0)));
case ParserYaccProd.ExpressionStringLiteral:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionConstant(Owner, FromTerminalTrim(0, 2, 1), ConstantType.StringLiteral, Line(0), Column(0)));
case ParserYaccProd.ExpressionInteger:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionConstant(Owner, FromTerminal(0), ConstantType.Integer, Line(0), Column(0)));
case ParserYaccProd.ExpressionLongInteger:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionConstant(Owner, FromTerminalTrim(0, 0, 1), ConstantType.LongInteger, Line(0), Column(0)));
case ParserYaccProd.ExpressionFloat:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionConstant(Owner, FromTerminal(0), ConstantType.Float, Line(0), Column(0)));
case ParserYaccProd.ExpressionTrue:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionConstant(Owner, true, Line(0), Column(0)));
case ParserYaccProd.ExpressionFalse:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionConstant(Owner, false, Line(0), Column(0)));
case ParserYaccProd.ExpressionNull:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionConstant(Owner, null, ConstantType.Null, Line(0), Column(0)));
case ParserYaccProd.ExpressionThis:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionThis(Owner, Line(0), Column(0)));
case ParserYaccProd.ExpressionBase:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionBaseClass(Owner, Line(0), Column(0)));
case ParserYaccProd.ExpressionTypeOf:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionTypeOf(Owner, (ValidateTypeIdentifier)FromProduction(2), Line(0), Column(0)));
case ParserYaccProd.ExpressionGroup:
2022-03-03 08:14:05 -06:00
return ReturnObject((ValidateExpression)FromProduction(1));
case ParserYaccProd.ExpressionDeclareTrigger:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionDeclareTrigger(Owner, (ValidateExpression)FromProduction(1), Line(0), Column(0)));
case ParserYaccProd.ExpressionUnaryOperationLogicalNot:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionUnaryOperation(OperationType.LogicalNot));
case ParserYaccProd.ExpressionUnaryMinus:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionUnaryOperation(OperationType.MathNegate));
case ParserYaccProd.ExpressionPostIncrement:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionPostUnaryOperation(OperationType.PostIncrement));
case ParserYaccProd.ExpressionPostDecrement:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionPostUnaryOperation(OperationType.PostDecrement));
case ParserYaccProd.ExpressionCastPrefixed:
2022-03-03 08:14:05 -06:00
string prefix = FromTerminal(1);
string typeName = FromTerminal(3);
ValidateExpression castee = (ValidateExpression)FromProduction(5);
return ReturnObject(new ValidateExpressionCast(Owner, new ValidateTypeIdentifier(Owner, prefix, typeName, Line(1), Column(1)), castee, Line(0), Column(0)));
case ParserYaccProd.ExpressionCast:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionCast(Owner, (ValidateExpression)FromProduction(1), (ValidateExpression)FromProduction(3), Line(0), Column(0)));
case ParserYaccProd.ExpressionOperationMathMultiply:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionOperation(OperationType.MathMultiply));
case ParserYaccProd.ExpressionOperationMathDivide:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionOperation(OperationType.MathDivide));
case ParserYaccProd.ExpressionOperationMathModulus:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionOperation(OperationType.MathModulus));
case ParserYaccProd.ExpressionOperationMathAdd:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionOperation(OperationType.MathAdd));
case ParserYaccProd.ExpressionOperationMathSubtract:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionOperation(OperationType.MathSubtract));
case ParserYaccProd.ExpressionOperationRelationalLessThan:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionOperation(OperationType.RelationalLessThan));
case ParserYaccProd.ExpressionOperationRelationalGreaterThan:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionOperation(OperationType.RelationalGreaterThan));
case ParserYaccProd.ExpressionOperationRelationalLessThanEquals:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionOperation(OperationType.RelationalLessThanEquals));
case ParserYaccProd.ExpressionOperationRelationalGreaterThanEquals:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionOperation(OperationType.RelationalGreaterThanEquals));
case ParserYaccProd.ExpressionOperationIs:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionIsCheck(Owner, (ValidateExpression)FromProduction(0), (ValidateTypeIdentifier)FromProduction(2), Line(1), Column(1)));
case ParserYaccProd.ExpressionOperationAs:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionAs(Owner, (ValidateExpression)FromProduction(0), (ValidateTypeIdentifier)FromProduction(2), Line(1), Column(1)));
case ParserYaccProd.ExpressionOperationRelationalEquals:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionOperation(OperationType.RelationalEquals));
case ParserYaccProd.ExpressionOperationRelationalNotEquals:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionOperation(OperationType.RelationalNotEquals));
case ParserYaccProd.ExpressionOperationLogicalAnd:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionOperation(OperationType.LogicalAnd));
case ParserYaccProd.ExpressionOperationLogicalOr:
2022-03-03 08:14:05 -06:00
return ReturnObject(ConstructValidateExpressionOperation(OperationType.LogicalOr));
case ParserYaccProd.ExpressionNullCoalescing:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionNullCoalescing(Owner, (ValidateExpression)FromProduction(0), (ValidateExpression)FromProduction(2), Line(1), Column(1)));
case ParserYaccProd.ExpressionTernary:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionTernary(Owner, (ValidateExpression)FromProduction(0), (ValidateExpression)FromProduction(2), (ValidateExpression)FromProduction(4), Line(1), Column(1)));
case ParserYaccProd.ExpressionAssignment:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateExpressionAssignment(Owner, (ValidateExpression)FromProduction(0), (ValidateExpression)FromProduction(2), Line(1), Column(1)));
case ParserYaccProd.ParametersEmpty:
2022-03-03 08:14:05 -06:00
return ReturnObject(ValidateParameter.EmptyList);
case ParserYaccProd.Parameters:
2022-03-03 08:14:05 -06:00
return ReturnObject((ValidateParameter)FromProduction(0));
case ParserYaccProd.ParameterListSingle:
2022-03-03 08:14:05 -06:00
ValidateExpression expression8 = (ValidateExpression)FromProduction(0);
return ReturnObject(new ValidateParameter(Owner, expression8, expression8.Line, expression8.Column));
case ParserYaccProd.ParameterListMulti:
2022-03-03 08:14:05 -06:00
ValidateParameter validateParameter1 = (ValidateParameter)FromProduction(0);
ValidateExpression expression9 = (ValidateExpression)FromProduction(2);
ValidateParameter validateParameter2 = new ValidateParameter(Owner, expression9, expression9.Line, expression9.Column);
validateParameter1.AppendToEnd(validateParameter2);
return ReturnObject(validateParameter1);
case ParserYaccProd.TypeIdentifierNamespaced:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateTypeIdentifier(Owner, FromTerminal(0), FromTerminal(2), Line(0), Column(0)));
case ParserYaccProd.TypeIdentifier:
2022-03-03 08:14:05 -06:00
return ReturnObject(new ValidateTypeIdentifier(Owner, null, FromTerminal(0), Line(0), Column(0)));
default:
return stackElement();
}
}
private ValidateExpressionOperation ConstructValidateExpressionOperation(
OperationType op)
{
ValidateExpression leftSide = (ValidateExpression)FromProduction(0);
ValidateExpression rightSide = (ValidateExpression)FromProduction(2);
return new ValidateExpressionOperation(Owner, leftSide, op, rightSide, Line(1), Column(1));
}
private ValidateExpressionOperation ConstructValidateExpressionUnaryOperation(
OperationType op)
{
return new ValidateExpressionOperation(Owner, (ValidateExpression)FromProduction(1), op, null, Line(0), Column(0));
}
private ValidateExpressionOperation ConstructValidateExpressionPostUnaryOperation(
OperationType op)
{
return new ValidateExpressionOperation(Owner, (ValidateExpression)FromProduction(0), op, null, Line(1), Column(1));
}
private ValidateMethod ConstructValidateMethod(bool hasBody)
{
string methodName = FromTerminal(2);
ValidateTypeIdentifier returnType = (ValidateTypeIdentifier)FromProduction(1);
Vector<MethodSpecifier> specifiers = (Vector<MethodSpecifier>)FromProduction(0);
ValidateParameterDefinitionList paramList = (ValidateParameterDefinitionList)FromProduction(4);
ValidateCode body = new ValidateCode(Owner, new ValidateStatementCompound(Owner, hasBody ? (ValidateStatement)FromProduction(7) : null, Line(6), Column(6)), Line(6), Column(6));
return new ValidateMethod(Owner, Line(2), Column(2), methodName, returnType, specifiers, paramList, body);
}
private int CurrentLine => m_lex.consumer().line();
private int CurrentColumn => m_lex.consumer().offset();
}