From 206b1bd6abb5841c5db65270d9ced2f3442ce19b Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Sat, 6 Oct 2018 12:03:42 +0300 Subject: Started Linux port for JSImpl - Added genie build script - fixed build with g++ --- JSImpl/src/Parser.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'JSImpl/src/Parser.cpp') diff --git a/JSImpl/src/Parser.cpp b/JSImpl/src/Parser.cpp index feb302c..bbde7f1 100644 --- a/JSImpl/src/Parser.cpp +++ b/JSImpl/src/Parser.cpp @@ -4,7 +4,7 @@ class Parser { public: - Parser(IPLVector& tokens, const std::function& onError = {}); + Parser(const IPLVector& tokens, const std::function& onError = {}); ExpressionPtr Parse(); private: bool MatchOneOf(IPLVector types); @@ -56,15 +56,15 @@ private: ExpressionPtr TopStatement(); Token& Prev() { return m_Tokens[m_Current - 1]; } - std::function OnError; - unsigned m_Current; IPLVector m_Tokens; + unsigned m_Current; + std::function OnError; }; -Parser::Parser(IPLVector& tokens, const std::function& onError) +Parser::Parser(const IPLVector& tokens, const std::function& onError) : m_Tokens(tokens) - , OnError(onError) , m_Current(0) + , OnError(onError) { } @@ -1011,8 +1011,8 @@ ExpressionPtr Parser::TopStatement() return result; } -ExpressionPtr Parse(IPLVector& tokens, const std::function& onError) +ExpressionPtr Parse(const IPLVector& tokens, const std::function& onError) { Parser p(tokens, onError); return p.Parse(); -} \ No newline at end of file +} -- cgit v1.3.1-23-gd82d