@@ -620,153 +620,6 @@ module HCL {
620620 }
621621}
622622
623- module JSON {
624- /** The base class for all AST nodes */
625- class AstNode extends @json_ast_node {
626- /** Gets a string representation of this element. */
627- string toString ( ) { result = this .getAPrimaryQlClass ( ) }
628-
629- /** Gets the location of this element. */
630- final L:: Location getLocation ( ) { json_ast_node_info ( this , _, _, result ) }
631-
632- /** Gets the parent of this element. */
633- final AstNode getParent ( ) { json_ast_node_info ( this , result , _, _) }
634-
635- /** Gets the index of this node among the children of its parent. */
636- final int getParentIndex ( ) { json_ast_node_info ( this , _, result , _) }
637-
638- /** Gets a field or child node of this node. */
639- AstNode getAFieldOrChild ( ) { none ( ) }
640-
641- /** Gets the name of the primary QL class for this element. */
642- string getAPrimaryQlClass ( ) { result = "???" }
643-
644- /** Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs. */
645- string getPrimaryQlClasses ( ) { result = concat ( this .getAPrimaryQlClass ( ) , "," ) }
646- }
647-
648- /** A token. */
649- class Token extends @json_token, AstNode {
650- /** Gets the value of this token. */
651- final string getValue ( ) { json_tokeninfo ( this , _, result ) }
652-
653- /** Gets a string representation of this element. */
654- final override string toString ( ) { result = this .getValue ( ) }
655-
656- /** Gets the name of the primary QL class for this element. */
657- override string getAPrimaryQlClass ( ) { result = "Token" }
658- }
659-
660- /** A reserved word. */
661- class ReservedWord extends @json_reserved_word, Token {
662- /** Gets the name of the primary QL class for this element. */
663- final override string getAPrimaryQlClass ( ) { result = "ReservedWord" }
664- }
665-
666- /** A class representing `array` nodes. */
667- class Array extends @json_array, AstNode {
668- /** Gets the name of the primary QL class for this element. */
669- final override string getAPrimaryQlClass ( ) { result = "Array" }
670-
671- /** Gets the `i`th child of this node. */
672- final Value getChild ( int i ) { json_array_child ( this , i , result ) }
673-
674- /** Gets a field or child node of this node. */
675- final override AstNode getAFieldOrChild ( ) { json_array_child ( this , _, result ) }
676- }
677-
678- /** A class representing `comment` tokens. */
679- class Comment extends @json_token_comment, Token {
680- /** Gets the name of the primary QL class for this element. */
681- final override string getAPrimaryQlClass ( ) { result = "Comment" }
682- }
683-
684- /** A class representing `document` nodes. */
685- class Document extends @json_document, AstNode {
686- /** Gets the name of the primary QL class for this element. */
687- final override string getAPrimaryQlClass ( ) { result = "Document" }
688-
689- /** Gets the `i`th child of this node. */
690- final Value getChild ( int i ) { json_document_child ( this , i , result ) }
691-
692- /** Gets a field or child node of this node. */
693- final override AstNode getAFieldOrChild ( ) { json_document_child ( this , _, result ) }
694- }
695-
696- /** A class representing `false` tokens. */
697- class False extends @json_token_false, Token {
698- /** Gets the name of the primary QL class for this element. */
699- final override string getAPrimaryQlClass ( ) { result = "False" }
700- }
701-
702- /** A class representing `null` tokens. */
703- class Null extends @json_token_null, Token {
704- /** Gets the name of the primary QL class for this element. */
705- final override string getAPrimaryQlClass ( ) { result = "Null" }
706- }
707-
708- /** A class representing `number` tokens. */
709- class Number extends @json_token_number, Token {
710- /** Gets the name of the primary QL class for this element. */
711- final override string getAPrimaryQlClass ( ) { result = "Number" }
712- }
713-
714- /** A class representing `object` nodes. */
715- class Object extends @json_object, AstNode {
716- /** Gets the name of the primary QL class for this element. */
717- final override string getAPrimaryQlClass ( ) { result = "Object" }
718-
719- /** Gets the `i`th child of this node. */
720- final Pair getChild ( int i ) { json_object_child ( this , i , result ) }
721-
722- /** Gets a field or child node of this node. */
723- final override AstNode getAFieldOrChild ( ) { json_object_child ( this , _, result ) }
724- }
725-
726- /** A class representing `pair` nodes. */
727- class Pair extends @json_pair, AstNode {
728- /** Gets the name of the primary QL class for this element. */
729- final override string getAPrimaryQlClass ( ) { result = "Pair" }
730-
731- /** Gets the node corresponding to the field `key`. */
732- final AstNode getKey ( ) { json_pair_def ( this , result , _) }
733-
734- /** Gets the node corresponding to the field `value`. */
735- final Value getValue ( ) { json_pair_def ( this , _, result ) }
736-
737- /** Gets a field or child node of this node. */
738- final override AstNode getAFieldOrChild ( ) {
739- json_pair_def ( this , result , _) or json_pair_def ( this , _, result )
740- }
741- }
742-
743- /** A class representing `string` nodes. */
744- class String extends @json_string__, AstNode {
745- /** Gets the name of the primary QL class for this element. */
746- final override string getAPrimaryQlClass ( ) { result = "String" }
747-
748- /** Gets the child of this node. */
749- final StringContent getChild ( ) { json_string_child ( this , result ) }
750-
751- /** Gets a field or child node of this node. */
752- final override AstNode getAFieldOrChild ( ) { json_string_child ( this , result ) }
753- }
754-
755- /** A class representing `string_content` tokens. */
756- class StringContent extends @json_token_string_content, Token {
757- /** Gets the name of the primary QL class for this element. */
758- final override string getAPrimaryQlClass ( ) { result = "StringContent" }
759- }
760-
761- /** A class representing `true` tokens. */
762- class True extends @json_token_true, Token {
763- /** Gets the name of the primary QL class for this element. */
764- final override string getAPrimaryQlClass ( ) { result = "True" }
765- }
766-
767- class Value extends @json_value, AstNode { }
768- }
769-
770623module DOCKERFILE {
771624 /** The base class for all AST nodes */
772625 class AstNode extends @dockerfile_ast_node {
0 commit comments