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-10-21 22:34:04 +02:00
|
|
|
|
2020-08-05 16:16:12 +02:00
|
|
|
import tokentype
|
2020-10-23 17:14:55 +02:00
|
|
|
import ../types/japlvalue
|
2020-08-05 17:50:29 +02:00
|
|
|
|
2020-08-05 16:16:12 +02:00
|
|
|
# Token object
|
|
|
|
|
|
|
|
type
|
2020-08-05 17:50:29 +02:00
|
|
|
Token* = ref object
|
2020-08-05 16:16:12 +02:00
|
|
|
kind*: TokenType
|
|
|
|
lexeme*: string
|
2020-08-05 17:50:29 +02:00
|
|
|
literal*: Value
|
2020-08-05 16:16:12 +02:00
|
|
|
line*: int
|