@@ -173,7 +173,7 @@ export interface Token {
173173 * Every node type a syntax script declaration file can contain.
174174 * @author efekos
175175 * @since 0.0.1-alpha
176- * @version 1.0.0
176+ * @version 1.0.1
177177 */
178178export enum NodeType {
179179
@@ -407,7 +407,7 @@ export interface OperatorStatement extends Statement {
407407/**
408408 * Keyword statement that registers an identifier as a keyword. This keyword can be used in several places. Uses type {@link NodeType.Keyword}.
409409 * @author efekos
410- * @version 1.0.0
410+ * @version 1.0.1
411411 * @since 0.0.1-alpha
412412 */
413413export interface KeywordStatement extends Statement {
@@ -419,20 +419,20 @@ export interface KeywordStatement extends Statement {
419419 * Imports statements indicate that a certain module should be imported to the file if the parent statement is used in .sys file.
420420 * Uses type {@link NodeType.Imports}.
421421 * @author efekos
422- * @version 1.0.0
422+ * @version 1.0.2
423423 * @since 0.0.1-alpha
424424 */
425425export interface ImportsStatement extends Statement {
426426 type : NodeType . Imports ,
427427 formats : IdentifierExpression [ ] ;
428- module : string ;
428+ module : StringExpression ;
429429}
430430
431431/**
432432 * Compile statements determine what should be the result of an operator or a function when compiling to certain languages.
433433 * Uses typq {@link NodeType.Compile}.
434434 * @author efekos
435- * @version 1.0.0
435+ * @version 1.0.1
436436 * @since 0.0.1-alpha
437437 */
438438export interface CompileStatement extends Statement {
@@ -445,7 +445,7 @@ export interface CompileStatement extends Statement {
445445 * Rule statements define a specific rule about the source language, such as keyword usages or enabling/disabling certain
446446 * features of the language. Uses type {@link NodeType.Rule}.
447447 * @author efekos
448- * @version 1.0.0
448+ * @version 1.0.1
449449 * @since 0.0.1-alpha
450450 */
451451export interface RuleStatement extends Statement {
@@ -458,7 +458,7 @@ export interface RuleStatement extends Statement {
458458 * Import statements are used to import a .syx file from a .sys file. They can be used to import other .syx files from a
459459 * .syx file as well. Uses type {@link NodeType.Import}
460460 * @author efekos
461- * @version 1.0.0
461+ * @version 1.0.1
462462 * @since 0.0.1-alpha
463463 */
464464export interface ImportStatement extends Statement {
@@ -470,21 +470,21 @@ export interface ImportStatement extends Statement {
470470 * Function statements are used to define possible function calls. How the function is called depends on the place this statement is
471471 * used. Uses type {@link NodeType.Function}.
472472 * @author efekos
473- * @version 1.0.0
473+ * @version 1.0.2
474474 * @since 0.0.1-alpha
475475 */
476476export interface FunctionStatement extends Statement {
477477 type : NodeType . Function ,
478478 name : IdentifierExpression ,
479- arguments : string [ ] ;
479+ arguments : PrimitiveTypeExpression [ ] ;
480480 body : Statement [ ] ;
481481}
482482
483483/**
484484 * Global statements are used to define values that are global. They can be global classes, interfaces, or just global methods depending on
485485 * the language. But the only thing that matters here is that they are global, and can be used from anywhere.
486486 * @author efekos
487- * @version 1.0.0
487+ * @version 1.0.1
488488 * @since 0.0.2-alpha
489489 */
490490export interface GlobalStatement extends Statement {
@@ -496,12 +496,12 @@ export interface GlobalStatement extends Statement {
496496/**
497497 * Represents any interface that is a node.
498498 * @author efekos
499- * @version 1.0.0
499+ * @version 1.0.3
500500 * @since 0.0.1-alpha
501501 */
502502export type Node =
503503 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 ;
505505
506506/**
507507 * Represents a syxconfig.json file. This file contains a few properties for the compiler.
@@ -584,6 +584,7 @@ interface NodeTypes {
584584 [ NodeType . Variable ] : VariableExpression ;
585585 [ NodeType . WhitespaceIdentifier ] : WhitespaceIdentifierExpression ;
586586 [ NodeType . Global ] : GlobalStatement ;
587+ [ NodeType . Identifier ] : IdentifierExpression ;
587588}
588589
589590/**
0 commit comments