macro processor: move changes from `cd99bb3af9c8ef6fd881fa0457121894f8edd14e` to the header file
parent
9b9c5beb5c
commit
b3ec807b90
|
@ -39,14 +39,8 @@ Eval::interpret(ostream &output, bool no_line_macro)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
Include::interpret(ostream &output, bool no_line_macro)
|
|
||||||
{
|
|
||||||
error(StackTrace("@#include", "should never be interpreted", location));
|
|
||||||
}
|
|
||||||
|
|
||||||
string
|
string
|
||||||
Include::interpretAndGetName()
|
Include::interpretAndGetName() const
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -67,14 +61,8 @@ Include::interpretAndGetName()
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
IncludePath::interpret(ostream &output, bool no_line_macro)
|
|
||||||
{
|
|
||||||
error(StackTrace("@#includepath", "should never be interpreted", location));
|
|
||||||
}
|
|
||||||
|
|
||||||
string
|
string
|
||||||
IncludePath::interpretAndGetPath()
|
IncludePath::interpretAndGetPath() const
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,8 +69,14 @@ namespace macro
|
||||||
public:
|
public:
|
||||||
Include(ExpressionPtr expr_arg, Environment &env_arg, Tokenizer::location location_arg) :
|
Include(ExpressionPtr expr_arg, Environment &env_arg, Tokenizer::location location_arg) :
|
||||||
Directive(env_arg, move(location_arg)), expr{move(expr_arg)} { }
|
Directive(env_arg, move(location_arg)), expr{move(expr_arg)} { }
|
||||||
void interpret(ostream &output, bool no_line_macro) override;
|
// Not interpretable because we want the class to be immutable (for use with shared_ptr)
|
||||||
string interpretAndGetName();
|
// If it were interpretable, the name would need to be stored in a non-const variable
|
||||||
|
// rendering the class mutable
|
||||||
|
inline void interpret(ostream &output, bool no_line_macro) override
|
||||||
|
{
|
||||||
|
error(StackTrace("@#include", "should never be interpreted", location));
|
||||||
|
}
|
||||||
|
string interpretAndGetName() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,8 +87,14 @@ namespace macro
|
||||||
public:
|
public:
|
||||||
IncludePath(ExpressionPtr expr_arg, Environment &env_arg, Tokenizer::location location_arg) :
|
IncludePath(ExpressionPtr expr_arg, Environment &env_arg, Tokenizer::location location_arg) :
|
||||||
Directive(env_arg, move(location_arg)), expr{move(expr_arg)} { }
|
Directive(env_arg, move(location_arg)), expr{move(expr_arg)} { }
|
||||||
void interpret(ostream &output, bool no_line_macro) override;
|
// Not interpretable because we want the class to be immutable (for use with shared_ptr)
|
||||||
string interpretAndGetPath();
|
// If it were interpretable, the name would need to be stored in a non-const variable
|
||||||
|
// rendering the class mutable
|
||||||
|
inline void interpret(ostream &output, bool no_line_macro) override
|
||||||
|
{
|
||||||
|
error(StackTrace("@#includepath", "should never be interpreted", location));
|
||||||
|
}
|
||||||
|
string interpretAndGetPath() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue