japl/meta/tokentype.nim

32 lines
984 B
Nim
Raw Normal View History

2020-10-21 22:49:08 +02:00
# Copyright 2020 Mattia Giambirtone
#
# 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.
2020-08-05 16:16:12 +02:00
# Token types enumeration
type
TokenType* = enum
PLUS, MINUS, SLASH, STAR,
NEG, NE, EQ, DEQ, LT, GE,
2020-08-06 14:51:50 +02:00
LE, MOD, POW, GT, LP, RP, LS
LB, RB, COMMA, DOT,
ID, RS, NUMBER, STR,
2020-08-05 16:16:12 +02:00
SEMICOLON, AND, CLASS,
ELSE, FOR, FUN, FALSE,
IF, NIL, RETURN, SUPER,
THIS, OR, TRUE, VAR,
WHILE, DEL, BREAK, EOF,
2020-08-30 12:35:37 +02:00
COLON, CONTINUE, CARET,
SHL, SHR, NAN, INF, BAND,
BOR, TILDE