mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-09-16 16:01:32 +00:00
182 lines
3.3 KiB
YAML
182 lines
3.3 KiB
YAML
root: Node
|
|
types:
|
|
Expression:
|
|
parent: Node
|
|
Symbol:
|
|
parent: Node
|
|
values:
|
|
- name: id
|
|
type: String
|
|
Declaration:
|
|
parent: Node
|
|
Definition:
|
|
parent: Node
|
|
values:
|
|
- name: symbol
|
|
type: Symbol
|
|
required: true
|
|
- name: modifiers
|
|
type: DefinitionModifiers
|
|
required: true
|
|
DefinitionModifiers:
|
|
values:
|
|
- name: export
|
|
type: Boolean
|
|
Block:
|
|
parent: Node
|
|
values:
|
|
- name: expressions
|
|
type: List<Expression>
|
|
CompilationUnit:
|
|
parent: Node
|
|
values:
|
|
- name: declarations
|
|
type: List<Declaration>
|
|
- name: definitions
|
|
type: List<Definition>
|
|
LetAssignment:
|
|
parent: Expression
|
|
values:
|
|
- name: symbol
|
|
type: Symbol
|
|
- name: value
|
|
type: Expression
|
|
InfixOperator:
|
|
values:
|
|
- name: token
|
|
type: String
|
|
enums:
|
|
- name: Plus
|
|
values:
|
|
token: "+"
|
|
- name: Minus
|
|
values:
|
|
token: "-"
|
|
- name: Multiply
|
|
values:
|
|
token: "*"
|
|
- name: Divide
|
|
values:
|
|
token: "/"
|
|
- name: Equals
|
|
values:
|
|
token: "=="
|
|
- name: NotEquals
|
|
values:
|
|
token: "!="
|
|
InfixOperation:
|
|
parent: Expression
|
|
values:
|
|
- name: left
|
|
type: Expression
|
|
- name: op
|
|
type: InfixOperator
|
|
- name: right
|
|
type: Expression
|
|
BooleanLiteral:
|
|
parent: Expression
|
|
values:
|
|
- name: value
|
|
type: Boolean
|
|
FunctionCall:
|
|
parent: Expression
|
|
values:
|
|
- name: symbol
|
|
type: Symbol
|
|
- name: arguments
|
|
type: List<Expression>
|
|
FunctionDefinition:
|
|
parent: Definition
|
|
values:
|
|
- name: modifiers
|
|
type: DefinitionModifiers
|
|
- name: symbol
|
|
type: Symbol
|
|
- name: arguments
|
|
type: List<Symbol>
|
|
- name: block
|
|
type: Block?
|
|
- name: native
|
|
type: Native?
|
|
If:
|
|
parent: Expression
|
|
values:
|
|
- name: condition
|
|
type: Expression
|
|
- name: thenBlock
|
|
type: Block
|
|
- name: elseBlock
|
|
type: Block?
|
|
ImportDeclaration:
|
|
parent: Declaration
|
|
values:
|
|
- name: form
|
|
type: Symbol
|
|
- name: components
|
|
type: List<Symbol>
|
|
IntegerLiteral:
|
|
parent: Expression
|
|
values:
|
|
- name: value
|
|
type: Int
|
|
DoubleLiteral:
|
|
parent: Expression
|
|
values:
|
|
- name: value
|
|
type: Double
|
|
ListLiteral:
|
|
parent: Expression
|
|
values:
|
|
- name: items
|
|
type: List<Expression>
|
|
Parentheses:
|
|
parent: Expression
|
|
values:
|
|
- name: expression
|
|
type: Expression
|
|
PrefixOperator:
|
|
values:
|
|
- name: token
|
|
type: String
|
|
enums:
|
|
- name: Negate
|
|
values:
|
|
token: "!"
|
|
PrefixOperation:
|
|
parent: Expression
|
|
values:
|
|
- name: op
|
|
type: PrefixOperator
|
|
- name: expression
|
|
type: Expression
|
|
StringLiteral:
|
|
parent: Expression
|
|
values:
|
|
- name: text
|
|
type: String
|
|
SymbolReference:
|
|
parent: Expression
|
|
values:
|
|
- name: symbol
|
|
type: Symbol
|
|
While:
|
|
parent: Expression
|
|
values:
|
|
- name: condition
|
|
type: Expression
|
|
- name: block
|
|
type: Block
|
|
Break:
|
|
parent: Expression
|
|
values: []
|
|
Continue:
|
|
parent: Expression
|
|
values: []
|
|
Native:
|
|
parent: Node
|
|
values:
|
|
- name: form
|
|
type: Symbol
|
|
- name: definition
|
|
type: StringLiteral
|