From 257ad3c2c5e633d2fd3f2228021ac3ae8d6d07cb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 12 Dec 2014 11:30:04 +0200 Subject: Initial buildfile parser implementation g++-4.9 -std=c++14 -g -I../../.. -o driver driver.cxx ../../../build/lexer.cxx ../../../build/parser.cxx && ./driver --- build/token | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'build/token') diff --git a/build/token b/build/token index bade45c..6f4951c 100644 --- a/build/token +++ b/build/token @@ -28,6 +28,12 @@ namespace build token_punctuation punctuation () const {assert (t_ == token_type::punctuation); return p_;} + bool + is (token_punctuation p) const + { + return t_ == token_type::punctuation && p_ == p; + } + std::uint64_t line () const {return l_;} std::uint64_t column () const {return c_;} -- cgit v1.1