swahili-lang
Version:
A new programming language with semantics borrowed from the Swahili language to help teach programming concepts to Swahili speaking students.
99 lines (67 loc) • 1.41 kB
JavaScript
/** map of all recognized token types */
module.exports = {
/** Integer */
INT: 'INT',
/** Float */
FLOAT: 'FLOAT',
/** String */
STRING: 'STRING',
/** Identifier */
IDENTIFIER: 'IDENTIFIER',
/** Keyword */
KEYWORD: 'KEYWORD',
/** Addition operator */
PLUS: 'PLUS',
/** Subtraction operator */
MINUS: 'MINUS',
/** Multiplication operator */
MUL: 'MUL',
/** Division operator */
DIV: 'DIV',
/** Power operator */
POW: 'POW',
/** Modulo operator */
MOD: 'MOD',
/** Assignment operator */
EQ: 'EQ',
/** Left parentheses */
LPAREN: 'LPAREN',
/** Right parentheses */
RPAREN: 'RPAREN',
/** Left square bracket */
LSQUARE: 'LSQUARE',
/** Right square bracket */
RSQUARE: 'RSQUARE',
/** Left curly bracket */
LCURL: 'LCURL',
/** Right curly bracket */
RCURL: 'RCURL',
/** Double equal comparison */
EE: 'EE',
/** Not equal comparison */
NE: 'NE',
/** Less than comparison */
LT: 'LT',
/** Greater than comparison */
GT: 'GT',
/** Less than or equal comparison */
LTE: 'LTE',
/** Greater than or equal comparison */
GTE: 'GTE',
/** Dot */
DOT: 'DOT',
/** Colon */
COL: 'COL',
/** Comma */
COMMA: 'COMMA',
/** AND symbol */
AND: 'AND',
/** OR symbol */
OR: 'OR',
/** NOT symbol */
NOT: 'NOT',
/** End of file */
EOF: 'EOF',
/** New line */
NEWLINE: 'NEWLINE',
};