21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
const auto& context() const { return m_context; }
auto& context() { return m_context; }
bool eos() const;
uint32_t currentLocation() { return m_tokProvider->currentLocation(); }
// Consume the next token. Bound identifiers are resolved, newlines are filtered.
optional< TermLoc > consume();
// Consume the next token. No resolution is performed on identifiers, newlines are filtered.
optional< TermLoc > consumeUnresolved();
// Consume the next token. No resolution is performed on identifiers, newlines are not filtered.
optional< TermLoc > consumeRaw();
optional< TermLoc > lookAhead( size_t distance = 0 );
optional< TermLoc > lookAheadUnresolved( size_t distance = 0 );
optional< TermLoc > lookAheadRaw( size_t distance = 0 );
// Consume newlines until a non newline token or eos is reached.
void consumeNewLines();
// Consume the next unit from the provider and yield each token that it contains.
// An unit is:
// - any brace, paren or bracket block and every unit they contain
// - any other token
Generator< TermLoc > consumeUnit();
void clearLookAheadCache() const;
|
|
|
<
<
<
<
<
<
|
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
const auto& context() const { return m_context; }
auto& context() { return m_context; }
bool eos() const;
uint32_t currentLocation() { return m_tokProvider->currentLocation(); }
// Consume the next token. Bound identifiers are resolved.
optional< TermLoc > consume();
// Consume the next token. No resolution is performed on identifiers.
optional< TermLoc > consumeUnresolved();
optional< TermLoc > lookAhead( size_t distance = 0 );
optional< TermLoc > lookAheadUnresolved( size_t distance = 0 );
optional< TermLoc > lookAheadRaw( size_t distance = 0 );
// Consume the next unit from the provider and yield each token that it contains.
// An unit is:
// - any brace, paren or bracket block and every unit they contain
// - any other token
Generator< TermLoc > consumeUnit();
void clearLookAheadCache() const;
|