Skip to content
← Back

src/syntax/parsers/identifiers/function_name.ghul

1
namespace Syntax.Parsers.Identifiers is
2
use IO.Std;
3
4
5
use Source;
6
7
class FUNCTION_NAME(): Base[Trees.Identifiers.Identifier] is
8
description: string => "function name";
9
10
super();
11
12
init(..) is
13
add_parser(
14
(context: CONTEXT) is
15
let name = context.current.value_string;
16
let result = Trees.Identifiers.Identifier(context.location, name);
17
context.next_token();
18
return result;
19
si,
20
Collections.LIST[Lexical.TOKEN]([Lexical.TOKEN.IDENTIFIER, Lexical.TOKEN.OPERATOR])
21
);
22
si
23
si
24
si