diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-10 11:10:15 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-10 11:10:15 +0200 |
commit | c5c880e5627d88ab2f7dd7596d59cf34ebba1ebb (patch) | |
tree | 806bb87344acee3bb1da454849178d9d86a10062 /build/lexer.cxx | |
parent | 5243f5b2dcfc5608bf7827454e80a16c0ce10329 (diff) |
Add support for token pre-processing in lexer
Diffstat (limited to 'build/lexer.cxx')
-rw-r--r-- | build/lexer.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/build/lexer.cxx b/build/lexer.cxx index b680234..79611c6 100644 --- a/build/lexer.cxx +++ b/build/lexer.cxx @@ -11,6 +11,15 @@ namespace build token lexer:: next () { + token t (next_impl ()); + if (processor_ != nullptr) + processor_ (t, *this); + return t; + } + + token lexer:: + next_impl () + { lexer_mode m (mode_.top ()); // For some modes we have dedicated imlementations of next(). |