changed ZScript include mechanism.
* It will now use #include, just like most other definition formats and can be mixed with regular definitions. However, due to how the Lemon-generated parser works this will not recursively pull in all files, but store them in a list and process them sequentially. Functionally this shouldn't make a difference, because ZScript is mostly order-independent - the only thing where order is important is native classes, but these are completely internal to zdoom.pk3 where proper order is observed.
This commit is contained in:
parent
136e976b2a
commit
0da233a664
5 changed files with 294 additions and 241 deletions
|
|
@ -140,6 +140,7 @@ external_declaration(X) ::= class_definition(A). { X = A; /*X-overwrites-A*
|
|||
external_declaration(X) ::= struct_def(A). { X = A; /*X-overwrites-A*/ }
|
||||
external_declaration(X) ::= enum_def(A). { X = A; /*X-overwrites-A*/ }
|
||||
external_declaration(X) ::= const_def(A). { X = A; /*X-overwrites-A*/ }
|
||||
external_declaration(X) ::= include_def. { X = nullptr; }
|
||||
|
||||
/* Optional bits. */
|
||||
opt_semicolon ::= .
|
||||
|
|
@ -156,6 +157,11 @@ opt_expr(X) ::= .
|
|||
opt_expr(X) ::= expr(X).
|
||||
|
||||
|
||||
include_def ::= INCLUDE string_constant(A).
|
||||
{
|
||||
AddInclude(A);
|
||||
}
|
||||
|
||||
/************ Class Definition ************/
|
||||
/* Can only occur at global scope. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue