Skip to content

Instantly share code, notes, and snippets.

@miketamis
Last active December 5, 2018 08:18
Show Gist options
  • Save miketamis/8949393d0035c27d9bd8cce237a473c3 to your computer and use it in GitHub Desktop.
Save miketamis/8949393d0035c27d9bd8cce237a473c3 to your computer and use it in GitHub Desktop.
interface Node {
type: string;
loc: SourceLocation | null;
}
interface SourceLocation {
source: string | null;
start: Position;
end: Position;
}
interface Position {
line: number; // >= 1
column: number; // >= 0
}
interface Program <: Node {
type: "Program";
body: [ Foo ];
}
interface Foo <: Node {
OutputVariables: [ Bar ];
inputVariables: [ Baz ];
index: number;
}
interface Import <: Foo {
type: "Import";
inputVariables: [];
}
interface Block <: Foo {
type: "Block";
code: string;
params: [ string ];
extension: string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment