|
|
|
|
10
|
import org.openzen.zencode.shared.CodePosition;
|
10
|
import org.openzen.zencode.shared.CodePosition;
|
11
|
import org.openzen.zenscript.codemodel.context.TypeResolutionContext;
|
11
|
import org.openzen.zenscript.codemodel.context.TypeResolutionContext;
|
12
|
import org.openzen.zenscript.codemodel.type.storage.StorageTag;
|
12
|
import org.openzen.zenscript.codemodel.type.storage.StorageTag;
|
13
|
-import org.openzen.zenscript.lexer.ParseException;
|
|
|
14
|
-import org.openzen.zenscript.lexer.ZSTokenParser;
|
|
|
15
|
-import org.openzen.zenscript.lexer.ZSTokenType;
|
|
|
|
|
13
|
+import org.openzen.zenscript.lexer.*;
|
16
|
|
14
|
|
17
|
/**
|
15
|
/**
|
18
|
*
|
16
|
*
|
|
|
|
|
25
|
if (parser.optional(ZSTokenType.T_BACKTICK) == null)
|
23
|
if (parser.optional(ZSTokenType.T_BACKTICK) == null)
|
26
|
return NULL;
|
24
|
return NULL;
|
27
|
|
25
|
|
28
|
- String name = parser.required(ZSTokenType.T_IDENTIFIER, "identifier expected").content;
|
|
|
|
|
26
|
+ ZSToken token = parser.optional(ZSTokenType.K_STATIC);
|
|
|
27
|
+ String name = token != null ? token.content : parser.required(ZSTokenType.T_IDENTIFIER, "identifier expected").content;
|
29
|
List<String> arguments = new ArrayList<>();
|
28
|
List<String> arguments = new ArrayList<>();
|
30
|
while (parser.optional(ZSTokenType.T_COLON) != null)
|
29
|
while (parser.optional(ZSTokenType.T_COLON) != null)
|
31
|
arguments.add(parser.next().content);
|
30
|
arguments.add(parser.next().content);
|