1
This commit is contained in:
parent
c4610bed76
commit
abee0bed17
@ -200,6 +200,11 @@ namespace a8
|
||||
return std::make_shared<Value>(stack[0]);
|
||||
}
|
||||
|
||||
bool Expr::MaybeExpr(const std::string& script)
|
||||
{
|
||||
return script.find('(') != std::string::npos;
|
||||
}
|
||||
|
||||
/*
|
||||
1: token
|
||||
-1: end
|
||||
|
@ -77,6 +77,7 @@ namespace a8
|
||||
|
||||
static std::shared_ptr<Value> Compile(const std::string& script, std::shared_ptr<Scope> env);
|
||||
static std::shared_ptr<Value> Eval(std::shared_ptr<Value> x, std::shared_ptr<Scope> env);
|
||||
static bool MaybeExpr(const std::string& script);
|
||||
|
||||
private:
|
||||
static int GetToken(const std::string& script, int& pos, std::string& token);
|
||||
|
Loading…
x
Reference in New Issue
Block a user