-
Notifications
You must be signed in to change notification settings - Fork 3
/
types.nim
27 lines (23 loc) · 996 Bytes
/
types.nim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
type
# information about a file(raz, lua, etc)
RazFileInfo* = object
fullPath*: string # This is a canonical full filesystem path
projPath*: string # This is relative to the project's root
shortName*: string # short name of the module
fileName*: string # name.ext
# used in Node and Symbol
RazLineInfo* = object
line*, col*: int16
fileIndex*: int32 # index into FileInfo list
# Lexer and Parser throw this exception
SourceError* = ref object of Exception
line*, column*: int
lineContent*: string # full source line content
fileIndex*: int32 # index into FileInfo list
# Semcheck and friends throw this exception
# useful for debugging purpose
# A stable app should never throw this exception
InternalError* = ref object of Exception
line*: int # Nim source line
fileName*: string # Nim source file name
OtherError* = ref object of Exception