Debian Codegraph @

src/token.rs

raw symbols SCIP
1 //TODO: Source file
2 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
3 pub struct Locationrust-analyzer cargo pp-rs 0.2.1 token/Location# {
4 /// Byte offset into the source string where the first char begins
5 pub startrust-analyzer cargo pp-rs 0.2.1 token/Location#start.: u32,
6 /// Byte offset into the source string where the first char not belonging to
7 /// this `Location` begins
8 pub endrust-analyzer cargo pp-rs 0.2.1 token/Location#end.: u32,
9 /// used internally in the `#line` directive and the `__LINE__` macro
10 pub(craterust-analyzer cargo pp-rs 0.2.1 crate/) linerust-analyzer cargo pp-rs 0.2.1 token/Location#line.: u32,
11 }
12
13 impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for Locationrust-analyzer cargo pp-rs 0.2.1 token/Location# {
14 fn defaultrust-analyzer cargo pp-rs 0.2.1 token/impl#[Location][Default]default().() -> Selfrust-analyzer cargo pp-rs 0.2.1 token/impl#[Location][Default] {
15 Locationrust-analyzer cargo pp-rs 0.2.1 token/Location# {
16 startrust-analyzer cargo pp-rs 0.2.1 token/Location#start.: 0,
17 endrust-analyzer cargo pp-rs 0.2.1 token/Location#end.: 0,
18 linerust-analyzer cargo pp-rs 0.2.1 token/Location#line.: 1,
19 }
20 }
21 }
22
23 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
24 pub enum Punctrust-analyzer cargo pp-rs 0.2.1 token/Punct# {
25 // Compound assignments
26 AddAssignrust-analyzer cargo pp-rs 0.2.1 token/Punct#AddAssign#,
27 SubAssignrust-analyzer cargo pp-rs 0.2.1 token/Punct#SubAssign#,
28 MulAssignrust-analyzer cargo pp-rs 0.2.1 token/Punct#MulAssign#,
29 DivAssignrust-analyzer cargo pp-rs 0.2.1 token/Punct#DivAssign#,
30 ModAssignrust-analyzer cargo pp-rs 0.2.1 token/Punct#ModAssign#,
31 LeftShiftAssignrust-analyzer cargo pp-rs 0.2.1 token/Punct#LeftShiftAssign#,
32 RightShiftAssignrust-analyzer cargo pp-rs 0.2.1 token/Punct#RightShiftAssign#,
33 AndAssignrust-analyzer cargo pp-rs 0.2.1 token/Punct#AndAssign#,
34 XorAssignrust-analyzer cargo pp-rs 0.2.1 token/Punct#XorAssign#,
35 OrAssignrust-analyzer cargo pp-rs 0.2.1 token/Punct#OrAssign#,
36
37 // Two character punctuation
38 Incrementrust-analyzer cargo pp-rs 0.2.1 token/Punct#Increment#,
39 Decrementrust-analyzer cargo pp-rs 0.2.1 token/Punct#Decrement#,
40 LogicalAndrust-analyzer cargo pp-rs 0.2.1 token/Punct#LogicalAnd#,
41 LogicalOrrust-analyzer cargo pp-rs 0.2.1 token/Punct#LogicalOr#,
42 LogicalXorrust-analyzer cargo pp-rs 0.2.1 token/Punct#LogicalXor#,
43 LessEqualrust-analyzer cargo pp-rs 0.2.1 token/Punct#LessEqual#,
44 GreaterEqualrust-analyzer cargo pp-rs 0.2.1 token/Punct#GreaterEqual#,
45 EqualEqualrust-analyzer cargo pp-rs 0.2.1 token/Punct#EqualEqual#,
46 NotEqualrust-analyzer cargo pp-rs 0.2.1 token/Punct#NotEqual#,
47 LeftShiftrust-analyzer cargo pp-rs 0.2.1 token/Punct#LeftShift#,
48 RightShiftrust-analyzer cargo pp-rs 0.2.1 token/Punct#RightShift#,
49
50 // Parenthesis or similar
51 LeftBracerust-analyzer cargo pp-rs 0.2.1 token/Punct#LeftBrace#,
52 RightBracerust-analyzer cargo pp-rs 0.2.1 token/Punct#RightBrace#,
53 LeftParenrust-analyzer cargo pp-rs 0.2.1 token/Punct#LeftParen#,
54 RightParenrust-analyzer cargo pp-rs 0.2.1 token/Punct#RightParen#,
55 LeftBracketrust-analyzer cargo pp-rs 0.2.1 token/Punct#LeftBracket#,
56 RightBracketrust-analyzer cargo pp-rs 0.2.1 token/Punct#RightBracket#,
57
58 // Other one character punctuation
59 LeftAnglerust-analyzer cargo pp-rs 0.2.1 token/Punct#LeftAngle#,
60 RightAnglerust-analyzer cargo pp-rs 0.2.1 token/Punct#RightAngle#,
61 Semicolonrust-analyzer cargo pp-rs 0.2.1 token/Punct#Semicolon#,
62 Commarust-analyzer cargo pp-rs 0.2.1 token/Punct#Comma#,
63 Colonrust-analyzer cargo pp-rs 0.2.1 token/Punct#Colon#,
64 Dotrust-analyzer cargo pp-rs 0.2.1 token/Punct#Dot#,
65 Equalrust-analyzer cargo pp-rs 0.2.1 token/Punct#Equal#,
66 Bangrust-analyzer cargo pp-rs 0.2.1 token/Punct#Bang#,
67 Minusrust-analyzer cargo pp-rs 0.2.1 token/Punct#Minus#,
68 Tilderust-analyzer cargo pp-rs 0.2.1 token/Punct#Tilde#,
69 Plusrust-analyzer cargo pp-rs 0.2.1 token/Punct#Plus#,
70 Starrust-analyzer cargo pp-rs 0.2.1 token/Punct#Star#,
71 Slashrust-analyzer cargo pp-rs 0.2.1 token/Punct#Slash#,
72 Percentrust-analyzer cargo pp-rs 0.2.1 token/Punct#Percent#,
73 Piperust-analyzer cargo pp-rs 0.2.1 token/Punct#Pipe#,
74 Caretrust-analyzer cargo pp-rs 0.2.1 token/Punct#Caret#,
75 Ampersandrust-analyzer cargo pp-rs 0.2.1 token/Punct#Ampersand#,
76 Questionrust-analyzer cargo pp-rs 0.2.1 token/Punct#Question#,
77 }
78
79 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
80 // TODO location?
81 pub enum PreprocessorErrorrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError# {
82 IntegerOverflowrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#IntegerOverflow#,
83 FloatParsingErrorrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#FloatParsingError#,
84 UnexpectedCharacterrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#UnexpectedCharacter#,
85 UnexpectedTokenrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#UnexpectedToken#(TokenValuerust-analyzer cargo pp-rs 0.2.1 token/TokenValue#),
86 UnexpectedHashrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#UnexpectedHash#,
87 UnexpectedNewLinerust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#UnexpectedNewLine#,
88 UnexpectedEndOfInputrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#UnexpectedEndOfInput#,
89 TooFewDefineArgumentsrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#TooFewDefineArguments#,
90 TooManyDefineArgumentsrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#TooManyDefineArguments#,
91 ErrorDirectiverust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#ErrorDirective#,
92 DuplicateParameterrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#DuplicateParameter#,
93 UnknownDirectiverust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#UnknownDirective#,
94 DefineRedefinedrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#DefineRedefined#,
95 ElifOutsideOfBlockrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#ElifOutsideOfBlock#,
96 ElseOutsideOfBlockrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#ElseOutsideOfBlock#,
97 EndifOutsideOfBlockrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#EndifOutsideOfBlock#,
98 ElifAfterElserust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#ElifAfterElse#,
99 MoreThanOneElserust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#MoreThanOneElse#,
100 UnfinishedBlockrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#UnfinishedBlock#,
101 LineOverflowrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#LineOverflow#,
102 NotSupported16BitLiteralrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#NotSupported16BitLiteral#,
103 NotSupported64BitLiteralrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#NotSupported64BitLiteral#,
104 MacroNotDefinedrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#MacroNotDefined#,
105 RecursionLimitReachedrust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#RecursionLimitReached#,
106 DivisionByZerorust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#DivisionByZero#,
107 RemainderByZerorust-analyzer cargo pp-rs 0.2.1 token/PreprocessorError#RemainderByZero#,
108 }
109
110 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
111 pub struct Integerrust-analyzer cargo pp-rs 0.2.1 token/Integer# {
112 pub valuerust-analyzer cargo pp-rs 0.2.1 token/Integer#value.: u64,
113 pub signedrust-analyzer cargo pp-rs 0.2.1 token/Integer#signed.: bool,
114 pub widthrust-analyzer cargo pp-rs 0.2.1 token/Integer#width.: i32,
115 }
116
117 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
118 pub struct Floatrust-analyzer cargo pp-rs 0.2.1 token/Float# {
119 pub valuerust-analyzer cargo pp-rs 0.2.1 token/Float#value.: f32,
120 pub widthrust-analyzer cargo pp-rs 0.2.1 token/Float#width.: i32,
121 }
122
123 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
124 pub struct Versionrust-analyzer cargo pp-rs 0.2.1 token/Version# {
125 pub tokensrust-analyzer cargo pp-rs 0.2.1 token/Version#tokens.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Tokenrust-analyzer cargo pp-rs 0.2.1 token/Token#>,
126 pub is_first_directiverust-analyzer cargo pp-rs 0.2.1 token/Version#is_first_directive.: bool,
127 pub has_comments_beforerust-analyzer cargo pp-rs 0.2.1 token/Version#has_comments_before.: bool,
128 }
129
130 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
131 pub struct Extensionrust-analyzer cargo pp-rs 0.2.1 token/Extension# {
132 pub tokensrust-analyzer cargo pp-rs 0.2.1 token/Extension#tokens.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Tokenrust-analyzer cargo pp-rs 0.2.1 token/Token#>,
133 pub has_non_directive_beforerust-analyzer cargo pp-rs 0.2.1 token/Extension#has_non_directive_before.: bool,
134 }
135
136 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
137 pub struct Pragmarust-analyzer cargo pp-rs 0.2.1 token/Pragma# {
138 pub tokensrust-analyzer cargo pp-rs 0.2.1 token/Pragma#tokens.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Tokenrust-analyzer cargo pp-rs 0.2.1 token/Token#>,
139 }
140
141 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
142 pub enum TokenValuerust-analyzer cargo pp-rs 0.2.1 token/TokenValue# {
143 Identrust-analyzer cargo pp-rs 0.2.1 token/TokenValue#Ident#(Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#),
144
145 Integerrust-analyzer cargo pp-rs 0.2.1 token/TokenValue#Integer#(Integerrust-analyzer cargo pp-rs 0.2.1 token/Integer#),
146 Floatrust-analyzer cargo pp-rs 0.2.1 token/TokenValue#Float#(Floatrust-analyzer cargo pp-rs 0.2.1 token/Float#),
147 Punctrust-analyzer cargo pp-rs 0.2.1 token/TokenValue#Punct#(Punctrust-analyzer cargo pp-rs 0.2.1 token/Punct#),
148
149 Versionrust-analyzer cargo pp-rs 0.2.1 token/TokenValue#Version#(Versionrust-analyzer cargo pp-rs 0.2.1 token/Version#),
150 Extensionrust-analyzer cargo pp-rs 0.2.1 token/TokenValue#Extension#(Extensionrust-analyzer cargo pp-rs 0.2.1 token/Extension#),
151 Pragmarust-analyzer cargo pp-rs 0.2.1 token/TokenValue#Pragma#(Pragmarust-analyzer cargo pp-rs 0.2.1 token/Pragma#),
152 }
153
154 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
155 pub struct Tokenrust-analyzer cargo pp-rs 0.2.1 token/Token# {
156 pub valuerust-analyzer cargo pp-rs 0.2.1 token/Token#value.: TokenValuerust-analyzer cargo pp-rs 0.2.1 token/TokenValue#,
157 pub locationrust-analyzer cargo pp-rs 0.2.1 token/Token#location.: Locationrust-analyzer cargo pp-rs 0.2.1 token/Location#,
158 // TODO macro invocation stack?
159 }