mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-12-13 18:10:42 +01:00
Allow space after function name, without parenthesis
This commit is contained in:
parent
96a81b1359
commit
44488d285f
@ -578,10 +578,8 @@ fn parse_identifier(context: &mut Context) -> Result<Expr, CalcError> {
|
|||||||
|| context.current_function.as_ref() == Some(&identifier.pure_name);
|
|| context.current_function.as_ref() == Some(&identifier.pure_name);
|
||||||
|
|
||||||
// Eg. sqrt64
|
// Eg. sqrt64
|
||||||
if match_token(context, TokenKind::Literal)
|
if exists_as_fn
|
||||||
|| peek(context).value == "π"
|
&& (match_token(context, TokenKind::Literal) || match_token(context, TokenKind::Identifier))
|
||||||
|| peek(context).value == "τ"
|
|
||||||
|| peek(context).value == "ϕ"
|
|
||||||
{
|
{
|
||||||
// If there is a function with this name, parse it as a function, with the next token as the argument.
|
// If there is a function with this name, parse it as a function, with the next token as the argument.
|
||||||
if exists_as_fn {
|
if exists_as_fn {
|
||||||
|
Loading…
Reference in New Issue
Block a user