@@ -173,7 +173,7 @@ export interface Token {
173
173
* Every node type a syntax script declaration file can contain.
174
174
* @author efekos
175
175
* @since 0.0.1-alpha
176
- * @version 1.0.0
176
+ * @version 1.0.1
177
177
*/
178
178
export enum NodeType {
179
179
@@ -407,7 +407,7 @@ export interface OperatorStatement extends Statement {
407
407
/**
408
408
* Keyword statement that registers an identifier as a keyword. This keyword can be used in several places. Uses type {@link NodeType.Keyword}.
409
409
* @author efekos
410
- * @version 1.0.0
410
+ * @version 1.0.1
411
411
* @since 0.0.1-alpha
412
412
*/
413
413
export interface KeywordStatement extends Statement {
@@ -419,20 +419,20 @@ export interface KeywordStatement extends Statement {
419
419
* Imports statements indicate that a certain module should be imported to the file if the parent statement is used in .sys file.
420
420
* Uses type {@link NodeType.Imports}.
421
421
* @author efekos
422
- * @version 1.0.0
422
+ * @version 1.0.2
423
423
* @since 0.0.1-alpha
424
424
*/
425
425
export interface ImportsStatement extends Statement {
426
426
type : NodeType . Imports ,
427
427
formats : IdentifierExpression [ ] ;
428
- module : string ;
428
+ module : StringExpression ;
429
429
}
430
430
431
431
/**
432
432
* Compile statements determine what should be the result of an operator or a function when compiling to certain languages.
433
433
* Uses typq {@link NodeType.Compile}.
434
434
* @author efekos
435
- * @version 1.0.0
435
+ * @version 1.0.1
436
436
* @since 0.0.1-alpha
437
437
*/
438
438
export interface CompileStatement extends Statement {
@@ -445,7 +445,7 @@ export interface CompileStatement extends Statement {
445
445
* Rule statements define a specific rule about the source language, such as keyword usages or enabling/disabling certain
446
446
* features of the language. Uses type {@link NodeType.Rule}.
447
447
* @author efekos
448
- * @version 1.0.0
448
+ * @version 1.0.1
449
449
* @since 0.0.1-alpha
450
450
*/
451
451
export interface RuleStatement extends Statement {
@@ -458,7 +458,7 @@ export interface RuleStatement extends Statement {
458
458
* Import statements are used to import a .syx file from a .sys file. They can be used to import other .syx files from a
459
459
* .syx file as well. Uses type {@link NodeType.Import}
460
460
* @author efekos
461
- * @version 1.0.0
461
+ * @version 1.0.1
462
462
* @since 0.0.1-alpha
463
463
*/
464
464
export interface ImportStatement extends Statement {
@@ -470,21 +470,21 @@ export interface ImportStatement extends Statement {
470
470
* Function statements are used to define possible function calls. How the function is called depends on the place this statement is
471
471
* used. Uses type {@link NodeType.Function}.
472
472
* @author efekos
473
- * @version 1.0.0
473
+ * @version 1.0.2
474
474
* @since 0.0.1-alpha
475
475
*/
476
476
export interface FunctionStatement extends Statement {
477
477
type : NodeType . Function ,
478
478
name : IdentifierExpression ,
479
- arguments : string [ ] ;
479
+ arguments : PrimitiveTypeExpression [ ] ;
480
480
body : Statement [ ] ;
481
481
}
482
482
483
483
/**
484
484
* Global statements are used to define values that are global. They can be global classes, interfaces, or just global methods depending on
485
485
* the language. But the only thing that matters here is that they are global, and can be used from anywhere.
486
486
* @author efekos
487
- * @version 1.0.0
487
+ * @version 1.0.1
488
488
* @since 0.0.2-alpha
489
489
*/
490
490
export interface GlobalStatement extends Statement {
@@ -496,12 +496,12 @@ export interface GlobalStatement extends Statement {
496
496
/**
497
497
* Represents any interface that is a node.
498
498
* @author efekos
499
- * @version 1.0.0
499
+ * @version 1.0.3
500
500
* @since 0.0.1-alpha
501
501
*/
502
502
export type Node =
503
503
ProgramStatement | OperatorStatement | CompileStatement | ImportStatement | ImportsStatement | FunctionStatement | KeywordStatement | RuleStatement | GlobalStatement |
504
- StringExpression | PrimitiveTypeExpression | VariableExpression | WhitespaceIdentifierExpression | BraceExpression | SquareExpression | ParenExpression ;
504
+ StringExpression | PrimitiveTypeExpression | VariableExpression | WhitespaceIdentifierExpression | BraceExpression | SquareExpression | ParenExpression | IdentifierExpression ;
505
505
506
506
/**
507
507
* Represents a syxconfig.json file. This file contains a few properties for the compiler.
@@ -584,6 +584,7 @@ interface NodeTypes {
584
584
[ NodeType . Variable ] : VariableExpression ;
585
585
[ NodeType . WhitespaceIdentifier ] : WhitespaceIdentifierExpression ;
586
586
[ NodeType . Global ] : GlobalStatement ;
587
+ [ NodeType . Identifier ] : IdentifierExpression ;
587
588
}
588
589
589
590
/**
0 commit comments