@@ -1743,3 +1743,116 @@ module Yaml {
17431743 final override AstNode getAFieldOrChild ( ) { yaml_yaml_child ( this , _, result ) }
17441744 }
17451745}
1746+
1747+ module Blame {
1748+ /** The base class for all AST nodes */
1749+ class AstNode extends @blame_ast_node {
1750+ /** Gets a string representation of this element. */
1751+ string toString ( ) { result = this .getAPrimaryQlClass ( ) }
1752+
1753+ /** Gets the location of this element. */
1754+ final L:: Location getLocation ( ) { blame_ast_node_info ( this , _, _, result ) }
1755+
1756+ /** Gets the parent of this element. */
1757+ final AstNode getParent ( ) { blame_ast_node_info ( this , result , _, _) }
1758+
1759+ /** Gets the index of this node among the children of its parent. */
1760+ final int getParentIndex ( ) { blame_ast_node_info ( this , _, result , _) }
1761+
1762+ /** Gets a field or child node of this node. */
1763+ AstNode getAFieldOrChild ( ) { none ( ) }
1764+
1765+ /** Gets the name of the primary QL class for this element. */
1766+ string getAPrimaryQlClass ( ) { result = "???" }
1767+
1768+ /** Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs. */
1769+ string getPrimaryQlClasses ( ) { result = concat ( this .getAPrimaryQlClass ( ) , "," ) }
1770+ }
1771+
1772+ /** A token. */
1773+ class Token extends @blame_token, AstNode {
1774+ /** Gets the value of this token. */
1775+ final string getValue ( ) { blame_tokeninfo ( this , _, result ) }
1776+
1777+ /** Gets a string representation of this element. */
1778+ final override string toString ( ) { result = this .getValue ( ) }
1779+
1780+ /** Gets the name of the primary QL class for this element. */
1781+ override string getAPrimaryQlClass ( ) { result = "Token" }
1782+ }
1783+
1784+ /** A reserved word. */
1785+ class ReservedWord extends @blame_reserved_word, Token {
1786+ /** Gets the name of the primary QL class for this element. */
1787+ final override string getAPrimaryQlClass ( ) { result = "ReservedWord" }
1788+ }
1789+
1790+ /** A class representing `blame_entry` nodes. */
1791+ class BlameEntry extends @blame_blame_entry, AstNode {
1792+ /** Gets the name of the primary QL class for this element. */
1793+ final override string getAPrimaryQlClass ( ) { result = "BlameEntry" }
1794+
1795+ /** Gets the node corresponding to the field `date`. */
1796+ final Date getDate ( ) { blame_blame_entry_def ( this , result ) }
1797+
1798+ /** Gets the node corresponding to the field `line`. */
1799+ final Number getLine ( int i ) { blame_blame_entry_line ( this , i , result ) }
1800+
1801+ /** Gets a field or child node of this node. */
1802+ final override AstNode getAFieldOrChild ( ) {
1803+ blame_blame_entry_def ( this , result ) or blame_blame_entry_line ( this , _, result )
1804+ }
1805+ }
1806+
1807+ /** A class representing `blame_info` nodes. */
1808+ class BlameInfo extends @blame_blame_info, AstNode {
1809+ /** Gets the name of the primary QL class for this element. */
1810+ final override string getAPrimaryQlClass ( ) { result = "BlameInfo" }
1811+
1812+ /** Gets the node corresponding to the field `file_entry`. */
1813+ final FileEntry getFileEntry ( int i ) { blame_blame_info_file_entry ( this , i , result ) }
1814+
1815+ /** Gets the node corresponding to the field `today`. */
1816+ final Date getToday ( ) { blame_blame_info_def ( this , result ) }
1817+
1818+ /** Gets a field or child node of this node. */
1819+ final override AstNode getAFieldOrChild ( ) {
1820+ blame_blame_info_file_entry ( this , _, result ) or blame_blame_info_def ( this , result )
1821+ }
1822+ }
1823+
1824+ /** A class representing `date` tokens. */
1825+ class Date extends @blame_token_date, Token {
1826+ /** Gets the name of the primary QL class for this element. */
1827+ final override string getAPrimaryQlClass ( ) { result = "Date" }
1828+ }
1829+
1830+ /** A class representing `file_entry` nodes. */
1831+ class FileEntry extends @blame_file_entry, AstNode {
1832+ /** Gets the name of the primary QL class for this element. */
1833+ final override string getAPrimaryQlClass ( ) { result = "FileEntry" }
1834+
1835+ /** Gets the node corresponding to the field `blame_entry`. */
1836+ final BlameEntry getBlameEntry ( int i ) { blame_file_entry_blame_entry ( this , i , result ) }
1837+
1838+ /** Gets the node corresponding to the field `file_name`. */
1839+ final Filename getFileName ( ) { blame_file_entry_def ( this , result ) }
1840+
1841+ /** Gets a field or child node of this node. */
1842+ final override AstNode getAFieldOrChild ( ) {
1843+ blame_file_entry_blame_entry ( this , _, result ) or blame_file_entry_def ( this , result )
1844+ }
1845+ }
1846+
1847+ /** A class representing `filename` tokens. */
1848+ class Filename extends @blame_token_filename, Token {
1849+ /** Gets the name of the primary QL class for this element. */
1850+ final override string getAPrimaryQlClass ( ) { result = "Filename" }
1851+ }
1852+
1853+ /** A class representing `number` tokens. */
1854+ class Number extends @blame_token_number, Token {
1855+ /** Gets the name of the primary QL class for this element. */
1856+ final override string getAPrimaryQlClass ( ) { result = "Number" }
1857+ }
1858+ }
0 commit comments