-9
Compiler.ps1
-9
Compiler.ps1
···
157
157
$this.Char = [String]($LexInput[0])
158
158
}
159
159
160
-
hidden [Void] AssertElementState([ElementState] $Expected) {
161
-
if ($Expected -ne $this.State) {
162
-
throw "Bad lexer state: expected $Expected, got $($this.State)"
163
-
}
164
-
}
165
-
166
160
hidden [String] PopChar() {
167
161
if ($this.NextPos -ge $this.LexInput.Length) {
168
162
$this.Char = ''
···
257
251
{$_ -eq [ElementState]::UNOPENED} {
258
252
$Token = [Token]::new( [TokenType]::OPEN_ELEMENT_START, $this.Char )
259
253
$this.State = [ElementState]::OPENED
260
-
}
261
-
{$_ -eq [ElementState]::OPENED} {
262
-
# $this.State = [ElementState]::
263
254
}
264
255
{$_ -eq [ElementState]::CLOSED} {
265
256
if ($this.PeekChar() -eq '/') {