#lang scheme/base
(provide (all-defined-out))
(define-struct Term (location) #:prefab)
(define-struct (Declaration Term) () #:prefab)
(define-struct (Statement Term) () #:prefab)
(define-struct (Expression Term) () #:prefab)
(define-struct (FunctionDeclaration Declaration) (name args body) #:prefab)
(define-struct (VariableDeclaration Declaration) (bindings) #:prefab)
(define-struct (VariableInitializer Term) (id init) #:prefab)
(define-struct (LetDeclaration Declaration) (bindings) #:prefab)
(define-struct (ImportDeclaration Declaration) (specifiers) #:prefab)
(define-struct (ImportSpecifier Term) (module bindings) #:prefab)
(define-struct (ImportBinding Term) (label binding) #:prefab)
(define-struct (ExclusionList Term) (ids) #:prefab)
(define-struct (ModuleSpecifier Term) (protocol elements) #:prefab)
(define-struct (ExportDeclaration Declaration) (specifiers) #:prefab)
(define-struct (ReexportSpecifier Term) (module exclusions) #:prefab)
(define-struct (ExportBindings Term) (bindings) #:prefab)
(define-struct (StringLiteral Expression) (value) #:prefab)
(define-struct (NumericLiteral Expression) (value) #:prefab)
(define-struct (BooleanLiteral Expression) (value) #:prefab)
(define-struct (NullLiteral Expression) () #:prefab)
(define-struct (RegexpLiteral Expression) (pattern global? case-insensitive?) #:prefab)
(define-struct (ArrayLiteral Expression) (elements) #:prefab)
(define-struct (ObjectLiteral Expression) (properties) #:prefab)
(define-struct (ThisReference Expression) () #:prefab)
(define-struct (VarReference Expression) (id) #:prefab)
(define-struct (BracketReference Expression) (container key) #:prefab)
(define-struct (DotReference Expression) (container id) #:prefab)
(define-struct (NewExpression Expression) (constructor arguments) #:prefab)
(define-struct (PostfixExpression Expression) (expression operator) #:prefab)
(define-struct (PrefixExpression Expression) (operator expression) #:prefab)
(define-struct (InfixExpression Expression) (left operator right) #:prefab)
(define-struct (ConditionalExpression Expression) (test consequent alternate) #:prefab)
(define-struct (AssignmentExpression Expression) (lhs operator rhs) #:prefab)
(define-struct (FunctionExpression Expression) (name args body) #:prefab)
(define-struct (LetExpression Expression) (bindings body) #:prefab)
(define-struct (CallExpression Expression) (method args) #:prefab)
(define-struct (ParenExpression Expression) (expression) #:prefab)
(define-struct (ListExpression Expression) (expressions) #:prefab)
(define-struct (BlockStatement Statement) (statements) #:prefab)
(define-struct (EmptyStatement Statement) () #:prefab)
(define-struct (ExpressionStatement Statement) (expression) #:prefab)
(define-struct (IfStatement Statement) (test consequent alternate) #:prefab)
(define-struct (DoWhileStatement Statement) (body test) #:prefab)
(define-struct (WhileStatement Statement) (test body) #:prefab)
(define-struct (ForStatement Statement) (init test incr body) #:prefab)
(define-struct (ForInStatement Statement) (lhs container body) #:prefab)
(define-struct (ContinueStatement Statement) (label) #:prefab)
(define-struct (BreakStatement Statement) (label) #:prefab)
(define-struct (ReturnStatement Statement) (value) #:prefab)
(define-struct (LetStatement Statement) (bindings body) #:prefab)
(define-struct (WithStatement Statement) (context body) #:prefab)
(define-struct (SwitchStatement Statement) (expression cases) #:prefab)
(define-struct (LabelledStatement Statement) (label statement) #:prefab)
(define-struct (ThrowStatement Statement) (value) #:prefab)
(define-struct (TryStatement Statement) (body catch finally) #:prefab)
(define-struct (Identifier Term) (name) #:prefab)
(define-struct (CaseClause Term) (question answer) #:prefab)
(define-struct (CatchClause Term) (id body) #:prefab)