1// Copyright (c) 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef TOOLS_GN_OPERATORS_H_
6#define TOOLS_GN_OPERATORS_H_
7
8class BinaryOpNode;
9class Err;
10class ParseNode;
11class Scope;
12class Token;
13class UnaryOpNode;
14class Value;
15
16bool IsUnaryOperator(const Token& token);
17bool IsBinaryOperator(const Token& token);
18
19bool IsFunctionCallArgBeginScoper(const Token& token);  // "("
20bool IsFunctionCallArgEndScoper(const Token& token);  // ")"
21
22bool IsScopeBeginScoper(const Token& token);  // "{"
23bool IsScopeEndScoper(const Token& token);  // "}"
24
25Value ExecuteUnaryOperator(Scope* scope,
26                           const UnaryOpNode* op_node,
27                           const Value& value,
28                           Err* err);
29Value ExecuteBinaryOperator(Scope* scope,
30                            const BinaryOpNode* op_node,
31                            const ParseNode* left,
32                            const ParseNode* right,
33                            Err* err);
34
35#endif  // TOOLS_GN_OPERATORS_H_
36