vxx2 / vlib / v3 / errors / error.v
31 lines · 26 sloc · 513 bytes · 6c4d26f1f98c5464b012a375667ab345e462f7e0
Raw
1module errors
2
3import v3.token
4
5// Reporter lists reporter values used by errors.
6pub enum Reporter {
7 scanner
8 parser
9 checker
10 gen
11}
12
13// CompilerMessage represents compiler message data used by errors.
14pub struct CompilerMessage {
15pub:
16 message string
17 details string
18 file_path string
19 pos token.Pos
20 reporter Reporter
21}
22
23// Error represents error data used by errors.
24pub struct Error {
25 CompilerMessage
26}
27
28// Warning represents warning data used by errors.
29pub struct Warning {
30 CompilerMessage
31}
32