![JAR search and dependency download from the Maven repository](/logo.png)
com.shapesecurity.shift.es2016.reducer.Reducer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of es2016 Show documentation
Show all versions of es2016 Show documentation
Shift format ECMAScript 2016 AST tooling
// Generated by shift-spec-java/reducer.js
/**
* Copyright 2016 Shape Security, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.shapesecurity.shift.es2016.reducer;
import com.shapesecurity.functional.data.ImmutableList;
import com.shapesecurity.functional.data.Maybe;
import com.shapesecurity.shift.es2016.ast.ArrayAssignmentTarget;
import com.shapesecurity.shift.es2016.ast.ArrayBinding;
import com.shapesecurity.shift.es2016.ast.ArrayExpression;
import com.shapesecurity.shift.es2016.ast.ArrowExpression;
import com.shapesecurity.shift.es2016.ast.AssignmentExpression;
import com.shapesecurity.shift.es2016.ast.AssignmentTargetIdentifier;
import com.shapesecurity.shift.es2016.ast.AssignmentTargetPropertyIdentifier;
import com.shapesecurity.shift.es2016.ast.AssignmentTargetPropertyProperty;
import com.shapesecurity.shift.es2016.ast.AssignmentTargetWithDefault;
import com.shapesecurity.shift.es2016.ast.BinaryExpression;
import com.shapesecurity.shift.es2016.ast.BindingIdentifier;
import com.shapesecurity.shift.es2016.ast.BindingPropertyIdentifier;
import com.shapesecurity.shift.es2016.ast.BindingPropertyProperty;
import com.shapesecurity.shift.es2016.ast.BindingWithDefault;
import com.shapesecurity.shift.es2016.ast.Block;
import com.shapesecurity.shift.es2016.ast.BlockStatement;
import com.shapesecurity.shift.es2016.ast.BreakStatement;
import com.shapesecurity.shift.es2016.ast.CallExpression;
import com.shapesecurity.shift.es2016.ast.CatchClause;
import com.shapesecurity.shift.es2016.ast.ClassDeclaration;
import com.shapesecurity.shift.es2016.ast.ClassElement;
import com.shapesecurity.shift.es2016.ast.ClassExpression;
import com.shapesecurity.shift.es2016.ast.CompoundAssignmentExpression;
import com.shapesecurity.shift.es2016.ast.ComputedMemberAssignmentTarget;
import com.shapesecurity.shift.es2016.ast.ComputedMemberExpression;
import com.shapesecurity.shift.es2016.ast.ComputedPropertyName;
import com.shapesecurity.shift.es2016.ast.ConditionalExpression;
import com.shapesecurity.shift.es2016.ast.ContinueStatement;
import com.shapesecurity.shift.es2016.ast.DataProperty;
import com.shapesecurity.shift.es2016.ast.DebuggerStatement;
import com.shapesecurity.shift.es2016.ast.Directive;
import com.shapesecurity.shift.es2016.ast.DoWhileStatement;
import com.shapesecurity.shift.es2016.ast.EmptyStatement;
import com.shapesecurity.shift.es2016.ast.Export;
import com.shapesecurity.shift.es2016.ast.ExportAllFrom;
import com.shapesecurity.shift.es2016.ast.ExportDefault;
import com.shapesecurity.shift.es2016.ast.ExportFrom;
import com.shapesecurity.shift.es2016.ast.ExportFromSpecifier;
import com.shapesecurity.shift.es2016.ast.ExportLocalSpecifier;
import com.shapesecurity.shift.es2016.ast.ExportLocals;
import com.shapesecurity.shift.es2016.ast.ExpressionStatement;
import com.shapesecurity.shift.es2016.ast.ForInStatement;
import com.shapesecurity.shift.es2016.ast.ForOfStatement;
import com.shapesecurity.shift.es2016.ast.ForStatement;
import com.shapesecurity.shift.es2016.ast.FormalParameters;
import com.shapesecurity.shift.es2016.ast.FunctionBody;
import com.shapesecurity.shift.es2016.ast.FunctionDeclaration;
import com.shapesecurity.shift.es2016.ast.FunctionExpression;
import com.shapesecurity.shift.es2016.ast.Getter;
import com.shapesecurity.shift.es2016.ast.IdentifierExpression;
import com.shapesecurity.shift.es2016.ast.IfStatement;
import com.shapesecurity.shift.es2016.ast.Import;
import com.shapesecurity.shift.es2016.ast.ImportNamespace;
import com.shapesecurity.shift.es2016.ast.ImportSpecifier;
import com.shapesecurity.shift.es2016.ast.LabeledStatement;
import com.shapesecurity.shift.es2016.ast.LiteralBooleanExpression;
import com.shapesecurity.shift.es2016.ast.LiteralInfinityExpression;
import com.shapesecurity.shift.es2016.ast.LiteralNullExpression;
import com.shapesecurity.shift.es2016.ast.LiteralNumericExpression;
import com.shapesecurity.shift.es2016.ast.LiteralRegExpExpression;
import com.shapesecurity.shift.es2016.ast.LiteralStringExpression;
import com.shapesecurity.shift.es2016.ast.Method;
import com.shapesecurity.shift.es2016.ast.Module;
import com.shapesecurity.shift.es2016.ast.NewExpression;
import com.shapesecurity.shift.es2016.ast.NewTargetExpression;
import com.shapesecurity.shift.es2016.ast.ObjectAssignmentTarget;
import com.shapesecurity.shift.es2016.ast.ObjectBinding;
import com.shapesecurity.shift.es2016.ast.ObjectExpression;
import com.shapesecurity.shift.es2016.ast.ReturnStatement;
import com.shapesecurity.shift.es2016.ast.Script;
import com.shapesecurity.shift.es2016.ast.Setter;
import com.shapesecurity.shift.es2016.ast.ShorthandProperty;
import com.shapesecurity.shift.es2016.ast.SpreadElement;
import com.shapesecurity.shift.es2016.ast.StaticMemberAssignmentTarget;
import com.shapesecurity.shift.es2016.ast.StaticMemberExpression;
import com.shapesecurity.shift.es2016.ast.StaticPropertyName;
import com.shapesecurity.shift.es2016.ast.Super;
import com.shapesecurity.shift.es2016.ast.SwitchCase;
import com.shapesecurity.shift.es2016.ast.SwitchDefault;
import com.shapesecurity.shift.es2016.ast.SwitchStatement;
import com.shapesecurity.shift.es2016.ast.SwitchStatementWithDefault;
import com.shapesecurity.shift.es2016.ast.TemplateElement;
import com.shapesecurity.shift.es2016.ast.TemplateExpression;
import com.shapesecurity.shift.es2016.ast.ThisExpression;
import com.shapesecurity.shift.es2016.ast.ThrowStatement;
import com.shapesecurity.shift.es2016.ast.TryCatchStatement;
import com.shapesecurity.shift.es2016.ast.TryFinallyStatement;
import com.shapesecurity.shift.es2016.ast.UnaryExpression;
import com.shapesecurity.shift.es2016.ast.UpdateExpression;
import com.shapesecurity.shift.es2016.ast.VariableDeclaration;
import com.shapesecurity.shift.es2016.ast.VariableDeclarationStatement;
import com.shapesecurity.shift.es2016.ast.VariableDeclarator;
import com.shapesecurity.shift.es2016.ast.WhileStatement;
import com.shapesecurity.shift.es2016.ast.WithStatement;
import com.shapesecurity.shift.es2016.ast.YieldExpression;
import com.shapesecurity.shift.es2016.ast.YieldGeneratorExpression;
import org.jetbrains.annotations.NotNull;
public interface Reducer {
@NotNull
State reduceArrayAssignmentTarget(
@NotNull ArrayAssignmentTarget node,
@NotNull ImmutableList> elements,
@NotNull Maybe rest);
@NotNull
State reduceArrayBinding(
@NotNull ArrayBinding node,
@NotNull ImmutableList> elements,
@NotNull Maybe rest);
@NotNull
State reduceArrayExpression(
@NotNull ArrayExpression node,
@NotNull ImmutableList> elements);
@NotNull
State reduceArrowExpression(
@NotNull ArrowExpression node,
@NotNull State params,
@NotNull State body);
@NotNull
State reduceAssignmentExpression(
@NotNull AssignmentExpression node,
@NotNull State binding,
@NotNull State expression);
@NotNull
State reduceAssignmentTargetIdentifier(@NotNull AssignmentTargetIdentifier node);
@NotNull
State reduceAssignmentTargetPropertyIdentifier(
@NotNull AssignmentTargetPropertyIdentifier node,
@NotNull State binding,
@NotNull Maybe init);
@NotNull
State reduceAssignmentTargetPropertyProperty(
@NotNull AssignmentTargetPropertyProperty node,
@NotNull State name,
@NotNull State binding);
@NotNull
State reduceAssignmentTargetWithDefault(
@NotNull AssignmentTargetWithDefault node,
@NotNull State binding,
@NotNull State init);
@NotNull
State reduceBinaryExpression(
@NotNull BinaryExpression node,
@NotNull State left,
@NotNull State right);
@NotNull
State reduceBindingIdentifier(@NotNull BindingIdentifier node);
@NotNull
State reduceBindingPropertyIdentifier(
@NotNull BindingPropertyIdentifier node,
@NotNull State binding,
@NotNull Maybe init);
@NotNull
State reduceBindingPropertyProperty(
@NotNull BindingPropertyProperty node,
@NotNull State name,
@NotNull State binding);
@NotNull
State reduceBindingWithDefault(
@NotNull BindingWithDefault node,
@NotNull State binding,
@NotNull State init);
@NotNull
State reduceBlock(
@NotNull Block node,
@NotNull ImmutableList statements);
@NotNull
State reduceBlockStatement(
@NotNull BlockStatement node,
@NotNull State block);
@NotNull
State reduceBreakStatement(@NotNull BreakStatement node);
@NotNull
State reduceCallExpression(
@NotNull CallExpression node,
@NotNull State callee,
@NotNull ImmutableList arguments);
@NotNull
State reduceCatchClause(
@NotNull CatchClause node,
@NotNull State binding,
@NotNull State body);
@NotNull
State reduceClassDeclaration(
@NotNull ClassDeclaration node,
@NotNull State name,
@NotNull Maybe _super,
@NotNull ImmutableList elements);
@NotNull
State reduceClassElement(
@NotNull ClassElement node,
@NotNull State method);
@NotNull
State reduceClassExpression(
@NotNull ClassExpression node,
@NotNull Maybe name,
@NotNull Maybe _super,
@NotNull ImmutableList elements);
@NotNull
State reduceCompoundAssignmentExpression(
@NotNull CompoundAssignmentExpression node,
@NotNull State binding,
@NotNull State expression);
@NotNull
State reduceComputedMemberAssignmentTarget(
@NotNull ComputedMemberAssignmentTarget node,
@NotNull State object,
@NotNull State expression);
@NotNull
State reduceComputedMemberExpression(
@NotNull ComputedMemberExpression node,
@NotNull State object,
@NotNull State expression);
@NotNull
State reduceComputedPropertyName(
@NotNull ComputedPropertyName node,
@NotNull State expression);
@NotNull
State reduceConditionalExpression(
@NotNull ConditionalExpression node,
@NotNull State test,
@NotNull State consequent,
@NotNull State alternate);
@NotNull
State reduceContinueStatement(@NotNull ContinueStatement node);
@NotNull
State reduceDataProperty(
@NotNull DataProperty node,
@NotNull State name,
@NotNull State expression);
@NotNull
State reduceDebuggerStatement(@NotNull DebuggerStatement node);
@NotNull
State reduceDirective(@NotNull Directive node);
@NotNull
State reduceDoWhileStatement(
@NotNull DoWhileStatement node,
@NotNull State body,
@NotNull State test);
@NotNull
State reduceEmptyStatement(@NotNull EmptyStatement node);
@NotNull
State reduceExport(
@NotNull Export node,
@NotNull State declaration);
@NotNull
State reduceExportAllFrom(@NotNull ExportAllFrom node);
@NotNull
State reduceExportDefault(
@NotNull ExportDefault node,
@NotNull State body);
@NotNull
State reduceExportFrom(
@NotNull ExportFrom node,
@NotNull ImmutableList namedExports);
@NotNull
State reduceExportFromSpecifier(@NotNull ExportFromSpecifier node);
@NotNull
State reduceExportLocalSpecifier(
@NotNull ExportLocalSpecifier node,
@NotNull State name);
@NotNull
State reduceExportLocals(
@NotNull ExportLocals node,
@NotNull ImmutableList namedExports);
@NotNull
State reduceExpressionStatement(
@NotNull ExpressionStatement node,
@NotNull State expression);
@NotNull
State reduceForInStatement(
@NotNull ForInStatement node,
@NotNull State left,
@NotNull State right,
@NotNull State body);
@NotNull
State reduceForOfStatement(
@NotNull ForOfStatement node,
@NotNull State left,
@NotNull State right,
@NotNull State body);
@NotNull
State reduceForStatement(
@NotNull ForStatement node,
@NotNull Maybe init,
@NotNull Maybe test,
@NotNull Maybe update,
@NotNull State body);
@NotNull
State reduceFormalParameters(
@NotNull FormalParameters node,
@NotNull ImmutableList items,
@NotNull Maybe rest);
@NotNull
State reduceFunctionBody(
@NotNull FunctionBody node,
@NotNull ImmutableList directives,
@NotNull ImmutableList statements);
@NotNull
State reduceFunctionDeclaration(
@NotNull FunctionDeclaration node,
@NotNull State name,
@NotNull State params,
@NotNull State body);
@NotNull
State reduceFunctionExpression(
@NotNull FunctionExpression node,
@NotNull Maybe name,
@NotNull State params,
@NotNull State body);
@NotNull
State reduceGetter(
@NotNull Getter node,
@NotNull State name,
@NotNull State body);
@NotNull
State reduceIdentifierExpression(@NotNull IdentifierExpression node);
@NotNull
State reduceIfStatement(
@NotNull IfStatement node,
@NotNull State test,
@NotNull State consequent,
@NotNull Maybe alternate);
@NotNull
State reduceImport(
@NotNull Import node,
@NotNull Maybe defaultBinding,
@NotNull ImmutableList namedImports);
@NotNull
State reduceImportNamespace(
@NotNull ImportNamespace node,
@NotNull Maybe defaultBinding,
@NotNull State namespaceBinding);
@NotNull
State reduceImportSpecifier(
@NotNull ImportSpecifier node,
@NotNull State binding);
@NotNull
State reduceLabeledStatement(
@NotNull LabeledStatement node,
@NotNull State body);
@NotNull
State reduceLiteralBooleanExpression(@NotNull LiteralBooleanExpression node);
@NotNull
State reduceLiteralInfinityExpression(@NotNull LiteralInfinityExpression node);
@NotNull
State reduceLiteralNullExpression(@NotNull LiteralNullExpression node);
@NotNull
State reduceLiteralNumericExpression(@NotNull LiteralNumericExpression node);
@NotNull
State reduceLiteralRegExpExpression(@NotNull LiteralRegExpExpression node);
@NotNull
State reduceLiteralStringExpression(@NotNull LiteralStringExpression node);
@NotNull
State reduceMethod(
@NotNull Method node,
@NotNull State name,
@NotNull State params,
@NotNull State body);
@NotNull
State reduceModule(
@NotNull Module node,
@NotNull ImmutableList directives,
@NotNull ImmutableList items);
@NotNull
State reduceNewExpression(
@NotNull NewExpression node,
@NotNull State callee,
@NotNull ImmutableList arguments);
@NotNull
State reduceNewTargetExpression(@NotNull NewTargetExpression node);
@NotNull
State reduceObjectAssignmentTarget(
@NotNull ObjectAssignmentTarget node,
@NotNull ImmutableList properties);
@NotNull
State reduceObjectBinding(
@NotNull ObjectBinding node,
@NotNull ImmutableList properties);
@NotNull
State reduceObjectExpression(
@NotNull ObjectExpression node,
@NotNull ImmutableList properties);
@NotNull
State reduceReturnStatement(
@NotNull ReturnStatement node,
@NotNull Maybe expression);
@NotNull
State reduceScript(
@NotNull Script node,
@NotNull ImmutableList directives,
@NotNull ImmutableList statements);
@NotNull
State reduceSetter(
@NotNull Setter node,
@NotNull State name,
@NotNull State param,
@NotNull State body);
@NotNull
State reduceShorthandProperty(
@NotNull ShorthandProperty node,
@NotNull State name);
@NotNull
State reduceSpreadElement(
@NotNull SpreadElement node,
@NotNull State expression);
@NotNull
State reduceStaticMemberAssignmentTarget(
@NotNull StaticMemberAssignmentTarget node,
@NotNull State object);
@NotNull
State reduceStaticMemberExpression(
@NotNull StaticMemberExpression node,
@NotNull State object);
@NotNull
State reduceStaticPropertyName(@NotNull StaticPropertyName node);
@NotNull
State reduceSuper(@NotNull Super node);
@NotNull
State reduceSwitchCase(
@NotNull SwitchCase node,
@NotNull State test,
@NotNull ImmutableList consequent);
@NotNull
State reduceSwitchDefault(
@NotNull SwitchDefault node,
@NotNull ImmutableList consequent);
@NotNull
State reduceSwitchStatement(
@NotNull SwitchStatement node,
@NotNull State discriminant,
@NotNull ImmutableList cases);
@NotNull
State reduceSwitchStatementWithDefault(
@NotNull SwitchStatementWithDefault node,
@NotNull State discriminant,
@NotNull ImmutableList preDefaultCases,
@NotNull State defaultCase,
@NotNull ImmutableList postDefaultCases);
@NotNull
State reduceTemplateElement(@NotNull TemplateElement node);
@NotNull
State reduceTemplateExpression(
@NotNull TemplateExpression node,
@NotNull Maybe tag,
@NotNull ImmutableList elements);
@NotNull
State reduceThisExpression(@NotNull ThisExpression node);
@NotNull
State reduceThrowStatement(
@NotNull ThrowStatement node,
@NotNull State expression);
@NotNull
State reduceTryCatchStatement(
@NotNull TryCatchStatement node,
@NotNull State body,
@NotNull State catchClause);
@NotNull
State reduceTryFinallyStatement(
@NotNull TryFinallyStatement node,
@NotNull State body,
@NotNull Maybe catchClause,
@NotNull State finalizer);
@NotNull
State reduceUnaryExpression(
@NotNull UnaryExpression node,
@NotNull State operand);
@NotNull
State reduceUpdateExpression(
@NotNull UpdateExpression node,
@NotNull State operand);
@NotNull
State reduceVariableDeclaration(
@NotNull VariableDeclaration node,
@NotNull ImmutableList declarators);
@NotNull
State reduceVariableDeclarationStatement(
@NotNull VariableDeclarationStatement node,
@NotNull State declaration);
@NotNull
State reduceVariableDeclarator(
@NotNull VariableDeclarator node,
@NotNull State binding,
@NotNull Maybe init);
@NotNull
State reduceWhileStatement(
@NotNull WhileStatement node,
@NotNull State test,
@NotNull State body);
@NotNull
State reduceWithStatement(
@NotNull WithStatement node,
@NotNull State object,
@NotNull State body);
@NotNull
State reduceYieldExpression(
@NotNull YieldExpression node,
@NotNull Maybe expression);
@NotNull
State reduceYieldGeneratorExpression(
@NotNull YieldGeneratorExpression node,
@NotNull State expression);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy