@@ -69,7 +69,7 @@ export function isClassMember(item: unknown): item is ClassMember {
6969 return reflection . isInstance ( item , ClassMember ) ;
7070}
7171
72- export type DefinitionElement = Globals | NamedElement | TypeOne ;
72+ export type DefinitionElement = Globals | NamedElement ;
7373
7474export const DefinitionElement = 'DefinitionElement' ;
7575
@@ -442,18 +442,6 @@ export function isStringExpression(item: unknown): item is StringExpression {
442442 return reflection . isInstance ( item , StringExpression ) ;
443443}
444444
445- export interface TypeOne extends AstNode {
446- readonly $type : 'TypeOne' | 'TypeTwo' ;
447- name : string ;
448- type : Reference < Class > ;
449- }
450-
451- export const TypeOne = 'TypeOne' ;
452-
453- export function isTypeOne ( item : unknown ) : item is TypeOne {
454- return reflection . isInstance ( item , TypeOne ) ;
455- }
456-
457445export interface UnaryExpression extends AstNode {
458446 readonly $container : BinaryExpression | ExpressionBlock | ForStatement | Grammar | IfStatement | MemberCall | ReturnStatement | UnaryExpression | VariableDeclaration | WhileStatement ;
459447 readonly $type : 'UnaryExpression' ;
@@ -497,18 +485,6 @@ export function isWhileStatement(item: unknown): item is WhileStatement {
497485 return reflection . isInstance ( item , WhileStatement ) ;
498486}
499487
500- export interface TypeTwo extends TypeOne {
501- readonly $type : 'TypeTwo' ;
502- name : string ;
503- type : Reference < Enum > ;
504- }
505-
506- export const TypeTwo = 'TypeTwo' ;
507-
508- export function isTypeTwo ( item : unknown ) : item is TypeTwo {
509- return reflection . isInstance ( item , TypeTwo ) ;
510- }
511-
512488export type CrmscriptAstType = {
513489 BinaryExpression : BinaryExpression
514490 BooleanExpression : BooleanExpression
@@ -541,8 +517,6 @@ export type CrmscriptAstType = {
541517 Statement : Statement
542518 StringExpression : StringExpression
543519 Type : Type
544- TypeOne : TypeOne
545- TypeTwo : TypeTwo
546520 UnaryExpression : UnaryExpression
547521 VariableDeclaration : VariableDeclaration
548522 WhileStatement : WhileStatement
@@ -551,7 +525,7 @@ export type CrmscriptAstType = {
551525export class CrmscriptAstReflection extends AbstractAstReflection {
552526
553527 getAllTypes ( ) : string [ ] {
554- return [ BinaryExpression , BooleanExpression , Class , ClassMember , Constructor , ConstructorCall , DefinitionElement , DefinitionUnit , Enum , EnumMember , Expression , ExpressionBlock , FieldMember , ForExecution , ForStatement , FunctionDeclaration , Globals , Grammar , IfStatement , Include , MemberCall , MethodMember , NamedElement , NilExpression , NumberExpression , Parameter , PrintStatement , ReturnStatement , Statement , StringExpression , Type , TypeOne , TypeTwo , UnaryExpression , VariableDeclaration , WhileStatement ] ;
528+ return [ BinaryExpression , BooleanExpression , Class , ClassMember , Constructor , ConstructorCall , DefinitionElement , DefinitionUnit , Enum , EnumMember , Expression , ExpressionBlock , FieldMember , ForExecution , ForStatement , FunctionDeclaration , Globals , Grammar , IfStatement , Include , MemberCall , MethodMember , NamedElement , NilExpression , NumberExpression , Parameter , PrintStatement , ReturnStatement , Statement , StringExpression , Type , UnaryExpression , VariableDeclaration , WhileStatement ] ;
555529 }
556530
557531 protected override computeIsSubtype ( subtype : string , supertype : string ) : boolean {
@@ -589,16 +563,12 @@ export class CrmscriptAstReflection extends AbstractAstReflection {
589563 case FunctionDeclaration : {
590564 return this . isSubtype ( NamedElement , supertype ) || this . isSubtype ( Type , supertype ) ;
591565 }
592- case Globals :
593- case TypeOne : {
566+ case Globals : {
594567 return this . isSubtype ( DefinitionElement , supertype ) ;
595568 }
596569 case NamedElement : {
597570 return this . isSubtype ( DefinitionElement , supertype ) || this . isSubtype ( Type , supertype ) ;
598571 }
599- case TypeTwo : {
600- return this . isSubtype ( TypeOne , supertype ) ;
601- }
602572 default : {
603573 return false ;
604574 }
@@ -614,8 +584,6 @@ export class CrmscriptAstReflection extends AbstractAstReflection {
614584 case 'Globals:returnType' :
615585 case 'MethodMember:returnType' :
616586 case 'Parameter:type' :
617- case 'TypeOne:type' :
618- case 'TypeTwo:type' :
619587 case 'VariableDeclaration:type' : {
620588 return Class ;
621589 }
@@ -625,9 +593,6 @@ export class CrmscriptAstReflection extends AbstractAstReflection {
625593 case 'MemberCall:element' : {
626594 return NamedElement ;
627595 }
628- case 'TypeTwo:type' : {
629- return Enum ;
630- }
631596 default : {
632597 throw new Error ( `${ referenceId } is not a valid reference id.` ) ;
633598 }
@@ -871,15 +836,6 @@ export class CrmscriptAstReflection extends AbstractAstReflection {
871836 ]
872837 } ;
873838 }
874- case TypeOne : {
875- return {
876- name : TypeOne ,
877- properties : [
878- { name : 'name' } ,
879- { name : 'type' }
880- ]
881- } ;
882- }
883839 case UnaryExpression : {
884840 return {
885841 name : UnaryExpression ,
@@ -911,15 +867,6 @@ export class CrmscriptAstReflection extends AbstractAstReflection {
911867 ]
912868 } ;
913869 }
914- case TypeTwo : {
915- return {
916- name : TypeTwo ,
917- properties : [
918- { name : 'name' } ,
919- { name : 'type' }
920- ]
921- } ;
922- }
923870 default : {
924871 return {
925872 name : type ,
0 commit comments