mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
python: New generated files
This commit is contained in:
@@ -218,6 +218,26 @@ library class Call_ extends @py_Call, Expr {
|
||||
override string toString() { result = "Call" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `Case` for further information. */
|
||||
library class Case_ extends @py_Case, Stmt {
|
||||
/** Gets the pattern of this case statement. */
|
||||
Pattern getPattern() { py_patterns(result, _, this, 1) }
|
||||
|
||||
/** Gets the guard of this case statement. */
|
||||
Expr getGuard() { py_exprs(result, _, this, 2) }
|
||||
|
||||
/** Gets the body of this case statement. */
|
||||
StmtList getBody() { py_stmt_lists(result, this, 3) }
|
||||
|
||||
/** Gets the nth statement of this case statement. */
|
||||
Stmt getStmt(int index) { result = this.getBody().getItem(index) }
|
||||
|
||||
/** Gets a statement of this case statement. */
|
||||
Stmt getAStmt() { result = this.getBody().getAnItem() }
|
||||
|
||||
override string toString() { result = "Case" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `Class` for further information. */
|
||||
library class Class_ extends @py_Class {
|
||||
/** Gets the name of this class. */
|
||||
@@ -232,6 +252,7 @@ library class Class_ extends @py_Class {
|
||||
/** Gets a statement of this class. */
|
||||
Stmt getAStmt() { result = this.getBody().getAnItem() }
|
||||
|
||||
/** Gets a parent of this class */
|
||||
ClassExpr getParent() { py_Classes(this, result) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
@@ -513,6 +534,7 @@ library class Function_ extends @py_Function {
|
||||
/** Whether the async property of this function is true. */
|
||||
predicate isAsync() { py_bools(this, 6) }
|
||||
|
||||
/** Gets a parent of this function */
|
||||
FunctionParent getParent() { py_Functions(this, result) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
@@ -577,6 +599,14 @@ library class GtE_ extends @py_GtE, Cmpop {
|
||||
override string toString() { result = "GtE" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `Guard` for further information. */
|
||||
library class Guard_ extends @py_Guard, Expr {
|
||||
/** Gets the test of this guard expression. */
|
||||
Expr getTest() { py_exprs(result, _, this, 2) }
|
||||
|
||||
override string toString() { result = "Guard" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `If` for further information. */
|
||||
library class If_ extends @py_If, Stmt {
|
||||
/** Gets the test of this if statement. */
|
||||
@@ -790,6 +820,172 @@ library class MatMult_ extends @py_MatMult, Operator {
|
||||
override string toString() { result = "MatMult" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `MatchStmt` for further information. */
|
||||
library class MatchStmt_ extends @py_MatchStmt, Stmt {
|
||||
/** Gets the subject of this match statement. */
|
||||
Expr getSubject() { py_exprs(result, _, this, 1) }
|
||||
|
||||
/** Gets the cases of this match statement. */
|
||||
StmtList getCases() { py_stmt_lists(result, this, 2) }
|
||||
|
||||
/** Gets the nth case of this match statement. */
|
||||
Stmt getCase(int index) { result = this.getCases().getItem(index) }
|
||||
|
||||
/** Gets a case of this match statement. */
|
||||
Stmt getACase() { result = this.getCases().getAnItem() }
|
||||
|
||||
override string toString() { result = "MatchStmt" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `MatchAsPattern` for further information. */
|
||||
library class MatchAsPattern_ extends @py_MatchAsPattern, Pattern {
|
||||
/** Gets the pattern of this matchaspattern pattern. */
|
||||
Pattern getPattern() { py_patterns(result, _, this, 2) }
|
||||
|
||||
/** Gets the alias of this matchaspattern pattern. */
|
||||
Expr getAlias() { py_exprs(result, _, this, 3) }
|
||||
|
||||
override string toString() { result = "MatchAsPattern" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `MatchCapturePattern` for further information. */
|
||||
library class MatchCapturePattern_ extends @py_MatchCapturePattern, Pattern {
|
||||
/** Gets the variable of this matchcapturepattern pattern. */
|
||||
Expr getVariable() { py_exprs(result, _, this, 2) }
|
||||
|
||||
override string toString() { result = "MatchCapturePattern" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `MatchClassPattern` for further information. */
|
||||
library class MatchClassPattern_ extends @py_MatchClassPattern, Pattern {
|
||||
/** Gets the class of this matchclasspattern pattern. */
|
||||
Expr getClass() { py_exprs(result, _, this, 2) }
|
||||
|
||||
/** Gets the class_name of this matchclasspattern pattern. */
|
||||
Expr getClassName() { py_exprs(result, _, this, 3) }
|
||||
|
||||
/** Gets the positional of this matchclasspattern pattern. */
|
||||
PatternList getPositional() { py_pattern_lists(result, this, 4) }
|
||||
|
||||
/** Gets the nth positional of this matchclasspattern pattern. */
|
||||
Pattern getPositional(int index) { result = this.getPositional().getItem(index) }
|
||||
|
||||
/** Gets a positional of this matchclasspattern pattern. */
|
||||
Pattern getAPositional() { result = this.getPositional().getAnItem() }
|
||||
|
||||
/** Gets the keyword of this matchclasspattern pattern. */
|
||||
PatternList getKeyword() { py_pattern_lists(result, this, 5) }
|
||||
|
||||
/** Gets the nth keyword of this matchclasspattern pattern. */
|
||||
Pattern getKeyword(int index) { result = this.getKeyword().getItem(index) }
|
||||
|
||||
/** Gets a keyword of this matchclasspattern pattern. */
|
||||
Pattern getAKeyword() { result = this.getKeyword().getAnItem() }
|
||||
|
||||
override string toString() { result = "MatchClassPattern" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `MatchDoubleStarPattern` for further information. */
|
||||
library class MatchDoubleStarPattern_ extends @py_MatchDoubleStarPattern, Pattern {
|
||||
/** Gets the target of this matchdoublestarpattern pattern. */
|
||||
Pattern getTarget() { py_patterns(result, _, this, 2) }
|
||||
|
||||
override string toString() { result = "MatchDoubleStarPattern" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `MatchKeyValuePattern` for further information. */
|
||||
library class MatchKeyValuePattern_ extends @py_MatchKeyValuePattern, Pattern {
|
||||
/** Gets the key of this matchkeyvaluepattern pattern. */
|
||||
Pattern getKey() { py_patterns(result, _, this, 2) }
|
||||
|
||||
/** Gets the value of this matchkeyvaluepattern pattern. */
|
||||
Pattern getValue() { py_patterns(result, _, this, 3) }
|
||||
|
||||
override string toString() { result = "MatchKeyValuePattern" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `MatchKeywordPattern` for further information. */
|
||||
library class MatchKeywordPattern_ extends @py_MatchKeywordPattern, Pattern {
|
||||
/** Gets the attribute of this matchkeywordpattern pattern. */
|
||||
Expr getAttribute() { py_exprs(result, _, this, 2) }
|
||||
|
||||
/** Gets the value of this matchkeywordpattern pattern. */
|
||||
Pattern getValue() { py_patterns(result, _, this, 3) }
|
||||
|
||||
override string toString() { result = "MatchKeywordPattern" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `MatchLiteralPattern` for further information. */
|
||||
library class MatchLiteralPattern_ extends @py_MatchLiteralPattern, Pattern {
|
||||
/** Gets the literal of this matchliteralpattern pattern. */
|
||||
Expr getLiteral() { py_exprs(result, _, this, 2) }
|
||||
|
||||
override string toString() { result = "MatchLiteralPattern" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `MatchMappingPattern` for further information. */
|
||||
library class MatchMappingPattern_ extends @py_MatchMappingPattern, Pattern {
|
||||
/** Gets the mappings of this matchmappingpattern pattern. */
|
||||
PatternList getMappings() { py_pattern_lists(result, this, 2) }
|
||||
|
||||
/** Gets the nth mapping of this matchmappingpattern pattern. */
|
||||
Pattern getMapping(int index) { result = this.getMappings().getItem(index) }
|
||||
|
||||
/** Gets a mapping of this matchmappingpattern pattern. */
|
||||
Pattern getAMapping() { result = this.getMappings().getAnItem() }
|
||||
|
||||
override string toString() { result = "MatchMappingPattern" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `MatchOrPattern` for further information. */
|
||||
library class MatchOrPattern_ extends @py_MatchOrPattern, Pattern {
|
||||
/** Gets the patterns of this matchorpattern pattern. */
|
||||
PatternList getPatterns() { py_pattern_lists(result, this, 2) }
|
||||
|
||||
/** Gets the nth pattern of this matchorpattern pattern. */
|
||||
Pattern getPattern(int index) { result = this.getPatterns().getItem(index) }
|
||||
|
||||
/** Gets a pattern of this matchorpattern pattern. */
|
||||
Pattern getAPattern() { result = this.getPatterns().getAnItem() }
|
||||
|
||||
override string toString() { result = "MatchOrPattern" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `MatchSequencePattern` for further information. */
|
||||
library class MatchSequencePattern_ extends @py_MatchSequencePattern, Pattern {
|
||||
/** Gets the patterns of this matchsequencepattern pattern. */
|
||||
PatternList getPatterns() { py_pattern_lists(result, this, 2) }
|
||||
|
||||
/** Gets the nth pattern of this matchsequencepattern pattern. */
|
||||
Pattern getPattern(int index) { result = this.getPatterns().getItem(index) }
|
||||
|
||||
/** Gets a pattern of this matchsequencepattern pattern. */
|
||||
Pattern getAPattern() { result = this.getPatterns().getAnItem() }
|
||||
|
||||
override string toString() { result = "MatchSequencePattern" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `MatchStarPattern` for further information. */
|
||||
library class MatchStarPattern_ extends @py_MatchStarPattern, Pattern {
|
||||
/** Gets the target of this matchstarpattern pattern. */
|
||||
Pattern getTarget() { py_patterns(result, _, this, 2) }
|
||||
|
||||
override string toString() { result = "MatchStarPattern" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `MatchValuePattern` for further information. */
|
||||
library class MatchValuePattern_ extends @py_MatchValuePattern, Pattern {
|
||||
/** Gets the value of this matchvaluepattern pattern. */
|
||||
Expr getValue() { py_exprs(result, _, this, 2) }
|
||||
|
||||
override string toString() { result = "MatchValuePattern" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `MatchWildcardPattern` for further information. */
|
||||
library class MatchWildcardPattern_ extends @py_MatchWildcardPattern, Pattern {
|
||||
override string toString() { result = "MatchWildcardPattern" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `Mod` for further information. */
|
||||
library class Mod_ extends @py_Mod, Operator {
|
||||
override string toString() { result = "Mod" }
|
||||
@@ -1073,6 +1269,7 @@ library class StringPart_ extends @py_StringPart {
|
||||
/** Gets the location of this implicitly concatenated part. */
|
||||
Location getLocation() { py_locations(result, this) }
|
||||
|
||||
/** Gets a parent of this implicitly concatenated part */
|
||||
StringPartList getParent() { py_StringParts(this, result, _) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
@@ -1081,6 +1278,7 @@ library class StringPart_ extends @py_StringPart {
|
||||
|
||||
/** INTERNAL: See the class `StringPartList` for further information. */
|
||||
library class StringPartList_ extends @py_StringPart_list {
|
||||
/** Gets a parent of this implicitly concatenated part list */
|
||||
BytesOrStr getParent() { py_StringPart_lists(this, result) }
|
||||
|
||||
/** Gets an item of this implicitly concatenated part list */
|
||||
@@ -1288,6 +1486,7 @@ library class Alias_ extends @py_alias {
|
||||
/** Gets the name of this alias. */
|
||||
Expr getAsname() { py_exprs(result, _, this, 1) }
|
||||
|
||||
/** Gets a parent of this alias */
|
||||
AliasList getParent() { py_aliases(this, result, _) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
@@ -1296,6 +1495,7 @@ library class Alias_ extends @py_alias {
|
||||
|
||||
/** INTERNAL: See the class `AliasList` for further information. */
|
||||
library class AliasList_ extends @py_alias_list {
|
||||
/** Gets a parent of this alias list */
|
||||
Import getParent() { py_alias_lists(this, result) }
|
||||
|
||||
/** Gets an item of this alias list */
|
||||
@@ -1352,6 +1552,7 @@ library class Arguments_ extends @py_arguments {
|
||||
/** Gets a keyword-only annotation of this parameters definition. */
|
||||
Expr getAKwAnnotation() { result = this.getKwAnnotations().getAnItem() }
|
||||
|
||||
/** Gets a parent of this parameters definition */
|
||||
ArgumentsParent getParent() { py_arguments(this, result) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
@@ -1378,6 +1579,7 @@ library class BoolParent_ extends @py_bool_parent {
|
||||
|
||||
/** INTERNAL: See the class `Boolop` for further information. */
|
||||
library class Boolop_ extends @py_boolop {
|
||||
/** Gets a parent of this boolean operator */
|
||||
BoolExpr getParent() { py_boolops(this, _, result) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
@@ -1386,6 +1588,7 @@ library class Boolop_ extends @py_boolop {
|
||||
|
||||
/** INTERNAL: See the class `Cmpop` for further information. */
|
||||
library class Cmpop_ extends @py_cmpop {
|
||||
/** Gets a parent of this comparison operator */
|
||||
CmpopList getParent() { py_cmpops(this, _, result, _) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
@@ -1394,6 +1597,7 @@ library class Cmpop_ extends @py_cmpop {
|
||||
|
||||
/** INTERNAL: See the class `CmpopList` for further information. */
|
||||
library class CmpopList_ extends @py_cmpop_list {
|
||||
/** Gets a parent of this comparison operator list */
|
||||
Compare getParent() { py_cmpop_lists(this, result) }
|
||||
|
||||
/** Gets an item of this comparison operator list */
|
||||
@@ -1426,6 +1630,7 @@ library class Comprehension_ extends @py_comprehension {
|
||||
/** Gets a condition of this comprehension. */
|
||||
Expr getAnIf() { result = this.getIfs().getAnItem() }
|
||||
|
||||
/** Gets a parent of this comprehension */
|
||||
ComprehensionList getParent() { py_comprehensions(this, result, _) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
@@ -1434,6 +1639,7 @@ library class Comprehension_ extends @py_comprehension {
|
||||
|
||||
/** INTERNAL: See the class `ComprehensionList` for further information. */
|
||||
library class ComprehensionList_ extends @py_comprehension_list {
|
||||
/** Gets a parent of this comprehension list */
|
||||
ListComp getParent() { py_comprehension_lists(this, result) }
|
||||
|
||||
/** Gets an item of this comprehension list */
|
||||
@@ -1448,6 +1654,7 @@ library class ComprehensionList_ extends @py_comprehension_list {
|
||||
|
||||
/** INTERNAL: See the class `DictItem` for further information. */
|
||||
library class DictItem_ extends @py_dict_item {
|
||||
/** Gets a parent of this dict_item */
|
||||
DictItemList getParent() { py_dict_items(this, _, result, _) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
@@ -1456,6 +1663,7 @@ library class DictItem_ extends @py_dict_item {
|
||||
|
||||
/** INTERNAL: See the class `DictItemList` for further information. */
|
||||
library class DictItemList_ extends @py_dict_item_list {
|
||||
/** Gets a parent of this dict_item list */
|
||||
DictItemListParent getParent() { py_dict_item_lists(this, result) }
|
||||
|
||||
/** Gets an item of this dict_item list */
|
||||
@@ -1482,6 +1690,7 @@ library class Expr_ extends @py_expr {
|
||||
/** Whether the parenthesised property of this expression is true. */
|
||||
predicate isParenthesised() { py_bools(this, 1) }
|
||||
|
||||
/** Gets a parent of this expression */
|
||||
ExprParent getParent() { py_exprs(this, _, result, _) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
@@ -1490,6 +1699,7 @@ library class Expr_ extends @py_expr {
|
||||
|
||||
/** INTERNAL: See the class `ExprContext` for further information. */
|
||||
library class ExprContext_ extends @py_expr_context {
|
||||
/** Gets a parent of this expression context */
|
||||
ExprContextParent getParent() { py_expr_contexts(this, _, result) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
@@ -1504,6 +1714,7 @@ library class ExprContextParent_ extends @py_expr_context_parent {
|
||||
|
||||
/** INTERNAL: See the class `ExprList` for further information. */
|
||||
library class ExprList_ extends @py_expr_list {
|
||||
/** Gets a parent of this expression list */
|
||||
ExprListParent getParent() { py_expr_lists(this, result, _) }
|
||||
|
||||
/** Gets an item of this expression list */
|
||||
@@ -1556,6 +1767,7 @@ library class LocationParent_ extends @py_location_parent {
|
||||
|
||||
/** INTERNAL: See the class `Operator` for further information. */
|
||||
library class Operator_ extends @py_operator {
|
||||
/** Gets a parent of this operator */
|
||||
BinaryExpr getParent() { py_operators(this, _, result) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
@@ -1568,6 +1780,48 @@ library class Parameter_ extends @py_parameter {
|
||||
string toString() { result = "Parameter" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `Pattern` for further information. */
|
||||
library class Pattern_ extends @py_pattern {
|
||||
/** Gets the location of this pattern. */
|
||||
Location getLocation() { py_locations(result, this) }
|
||||
|
||||
/** Whether the parenthesised property of this pattern is true. */
|
||||
predicate isParenthesised() { py_bools(this, 1) }
|
||||
|
||||
/** Gets a parent of this pattern */
|
||||
PatternParent getParent() { py_patterns(this, _, result, _) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
string toString() { result = "Pattern" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `PatternList` for further information. */
|
||||
library class PatternList_ extends @py_pattern_list {
|
||||
/** Gets a parent of this pattern list */
|
||||
PatternListParent getParent() { py_pattern_lists(this, result, _) }
|
||||
|
||||
/** Gets an item of this pattern list */
|
||||
Pattern getAnItem() { py_patterns(result, _, this, _) }
|
||||
|
||||
/** Gets the nth item of this pattern list */
|
||||
Pattern getItem(int index) { py_patterns(result, _, this, index) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
string toString() { result = "PatternList" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `PatternListParent` for further information. */
|
||||
library class PatternListParent_ extends @py_pattern_list_parent {
|
||||
/** Gets a textual representation of this element. */
|
||||
string toString() { result = "PatternListParent" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `PatternParent` for further information. */
|
||||
library class PatternParent_ extends @py_pattern_parent {
|
||||
/** Gets a textual representation of this element. */
|
||||
string toString() { result = "PatternParent" }
|
||||
}
|
||||
|
||||
/** INTERNAL: See the class `Scope` for further information. */
|
||||
library class Scope_ extends @py_scope {
|
||||
/** Gets a textual representation of this element. */
|
||||
@@ -1579,6 +1833,7 @@ library class Stmt_ extends @py_stmt {
|
||||
/** Gets the location of this statement. */
|
||||
Location getLocation() { py_locations(result, this) }
|
||||
|
||||
/** Gets a parent of this statement */
|
||||
StmtList getParent() { py_stmts(this, _, result, _) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
@@ -1587,6 +1842,7 @@ library class Stmt_ extends @py_stmt {
|
||||
|
||||
/** INTERNAL: See the class `StmtList` for further information. */
|
||||
library class StmtList_ extends @py_stmt_list {
|
||||
/** Gets a parent of this statement list */
|
||||
StmtListParent getParent() { py_stmt_lists(this, result, _) }
|
||||
|
||||
/** Gets an item of this statement list */
|
||||
@@ -1607,6 +1863,7 @@ library class StmtListParent_ extends @py_stmt_list_parent {
|
||||
|
||||
/** INTERNAL: See the class `StringList` for further information. */
|
||||
library class StringList_ extends @py_str_list {
|
||||
/** Gets a parent of this string list */
|
||||
StrListParent getParent() { py_str_lists(this, result) }
|
||||
|
||||
/** Gets an item of this string list */
|
||||
@@ -1633,6 +1890,7 @@ library class StrParent_ extends @py_str_parent {
|
||||
|
||||
/** INTERNAL: See the class `Unaryop` for further information. */
|
||||
library class Unaryop_ extends @py_unaryop {
|
||||
/** Gets a parent of this unary operation */
|
||||
UnaryExpr getParent() { py_unaryops(this, _, result) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
|
||||
@@ -231,6 +231,11 @@ py_extracted_version(int module : @py_Module ref,
|
||||
/* <Field> Call.positional_args = 3, expr_list */
|
||||
/* <Field> Call.named_args = 4, dict_item_list */
|
||||
|
||||
/* <Field> Case.location = 0, location */
|
||||
/* <Field> Case.pattern = 1, pattern */
|
||||
/* <Field> Case.guard = 2, expr */
|
||||
/* <Field> Case.body = 3, stmt_list */
|
||||
|
||||
/* <Field> Class.name = 0, str */
|
||||
/* <Field> Class.body = 1, stmt_list */
|
||||
/* <Parent> Class = ClassExpr */
|
||||
@@ -323,6 +328,10 @@ py_extracted_version(int module : @py_Module ref,
|
||||
/* <Field> Global.location = 0, location */
|
||||
/* <Field> Global.names = 1, str_list */
|
||||
|
||||
/* <Field> Guard.location = 0, location */
|
||||
/* <Field> Guard.parenthesised = 1, bool */
|
||||
/* <Field> Guard.test = 2, expr */
|
||||
|
||||
/* <Field> If.location = 0, location */
|
||||
/* <Field> If.test = 1, expr */
|
||||
/* <Field> If.body = 2, stmt_list */
|
||||
@@ -377,6 +386,67 @@ py_extracted_version(int module : @py_Module ref,
|
||||
/* <Field> ListComp.generators = 4, comprehension_list */
|
||||
/* <Field> ListComp.elt = 5, expr */
|
||||
|
||||
/* <Field> MatchStmt.location = 0, location */
|
||||
/* <Field> MatchStmt.subject = 1, expr */
|
||||
/* <Field> MatchStmt.cases = 2, stmt_list */
|
||||
|
||||
/* <Field> MatchAsPattern.location = 0, location */
|
||||
/* <Field> MatchAsPattern.parenthesised = 1, bool */
|
||||
/* <Field> MatchAsPattern.pattern = 2, pattern */
|
||||
/* <Field> MatchAsPattern.alias = 3, expr */
|
||||
|
||||
/* <Field> MatchCapturePattern.location = 0, location */
|
||||
/* <Field> MatchCapturePattern.parenthesised = 1, bool */
|
||||
/* <Field> MatchCapturePattern.variable = 2, expr */
|
||||
|
||||
/* <Field> MatchClassPattern.location = 0, location */
|
||||
/* <Field> MatchClassPattern.parenthesised = 1, bool */
|
||||
/* <Field> MatchClassPattern.class = 2, expr */
|
||||
/* <Field> MatchClassPattern.class_name = 3, expr */
|
||||
/* <Field> MatchClassPattern.positional = 4, pattern_list */
|
||||
/* <Field> MatchClassPattern.keyword = 5, pattern_list */
|
||||
|
||||
/* <Field> MatchDoubleStarPattern.location = 0, location */
|
||||
/* <Field> MatchDoubleStarPattern.parenthesised = 1, bool */
|
||||
/* <Field> MatchDoubleStarPattern.target = 2, pattern */
|
||||
|
||||
/* <Field> MatchKeyValuePattern.location = 0, location */
|
||||
/* <Field> MatchKeyValuePattern.parenthesised = 1, bool */
|
||||
/* <Field> MatchKeyValuePattern.key = 2, pattern */
|
||||
/* <Field> MatchKeyValuePattern.value = 3, pattern */
|
||||
|
||||
/* <Field> MatchKeywordPattern.location = 0, location */
|
||||
/* <Field> MatchKeywordPattern.parenthesised = 1, bool */
|
||||
/* <Field> MatchKeywordPattern.attribute = 2, expr */
|
||||
/* <Field> MatchKeywordPattern.value = 3, pattern */
|
||||
|
||||
/* <Field> MatchLiteralPattern.location = 0, location */
|
||||
/* <Field> MatchLiteralPattern.parenthesised = 1, bool */
|
||||
/* <Field> MatchLiteralPattern.literal = 2, expr */
|
||||
|
||||
/* <Field> MatchMappingPattern.location = 0, location */
|
||||
/* <Field> MatchMappingPattern.parenthesised = 1, bool */
|
||||
/* <Field> MatchMappingPattern.mappings = 2, pattern_list */
|
||||
|
||||
/* <Field> MatchOrPattern.location = 0, location */
|
||||
/* <Field> MatchOrPattern.parenthesised = 1, bool */
|
||||
/* <Field> MatchOrPattern.patterns = 2, pattern_list */
|
||||
|
||||
/* <Field> MatchSequencePattern.location = 0, location */
|
||||
/* <Field> MatchSequencePattern.parenthesised = 1, bool */
|
||||
/* <Field> MatchSequencePattern.patterns = 2, pattern_list */
|
||||
|
||||
/* <Field> MatchStarPattern.location = 0, location */
|
||||
/* <Field> MatchStarPattern.parenthesised = 1, bool */
|
||||
/* <Field> MatchStarPattern.target = 2, pattern */
|
||||
|
||||
/* <Field> MatchValuePattern.location = 0, location */
|
||||
/* <Field> MatchValuePattern.parenthesised = 1, bool */
|
||||
/* <Field> MatchValuePattern.value = 2, expr */
|
||||
|
||||
/* <Field> MatchWildcardPattern.location = 0, location */
|
||||
/* <Field> MatchWildcardPattern.parenthesised = 1, bool */
|
||||
|
||||
/* <Field> Module.name = 0, str */
|
||||
/* <Field> Module.hash = 1, str */
|
||||
/* <Field> Module.body = 2, stmt_list */
|
||||
@@ -551,6 +621,11 @@ py_extracted_version(int module : @py_Module ref,
|
||||
/* <Parent> Operator = BinaryExpr */
|
||||
/* <Parent> ParameterList = Function */
|
||||
|
||||
/* <Field> Pattern.location = 0, location */
|
||||
/* <Field> Pattern.parenthesised = 1, bool */
|
||||
/* <Parent> Pattern = PatternParent */
|
||||
/* <Parent> PatternList = PatternListParent */
|
||||
|
||||
/* <Field> Stmt.location = 0, location */
|
||||
/* <Parent> Stmt = StmtList */
|
||||
/* <Parent> StmtList = StmtListParent */
|
||||
@@ -647,6 +722,15 @@ py_operators(unique int id : @py_operator,
|
||||
py_parameter_lists(unique int id : @py_parameter_list,
|
||||
unique int parent : @py_Function ref);
|
||||
|
||||
py_patterns(unique int id : @py_pattern,
|
||||
int kind: int ref,
|
||||
int parent : @py_pattern_parent ref,
|
||||
int idx : int ref);
|
||||
|
||||
py_pattern_lists(unique int id : @py_pattern_list,
|
||||
int parent : @py_pattern_list_parent ref,
|
||||
int idx : int ref);
|
||||
|
||||
py_stmts(unique int id : @py_stmt,
|
||||
int kind: int ref,
|
||||
int parent : @py_stmt_list ref,
|
||||
@@ -710,27 +794,28 @@ case @py_expr.kind of
|
||||
| 15 = @py_Lambda
|
||||
| 16 = @py_List
|
||||
| 17 = @py_ListComp
|
||||
| 18 = @py_Name
|
||||
| 19 = @py_Num
|
||||
| 20 = @py_Repr
|
||||
| 21 = @py_Set
|
||||
| 22 = @py_SetComp
|
||||
| 23 = @py_Slice
|
||||
| 24 = @py_Starred
|
||||
| 25 = @py_Str
|
||||
| 26 = @py_Subscript
|
||||
| 27 = @py_Tuple
|
||||
| 28 = @py_UnaryExpr
|
||||
| 29 = @py_Yield
|
||||
| 30 = @py_YieldFrom
|
||||
| 31 = @py_TemplateDottedNotation
|
||||
| 32 = @py_Filter
|
||||
| 33 = @py_PlaceHolder
|
||||
| 34 = @py_Await
|
||||
| 35 = @py_Fstring
|
||||
| 36 = @py_FormattedValue
|
||||
| 37 = @py_AssignExpr
|
||||
| 38 = @py_SpecialOperation;
|
||||
| 18 = @py_Guard
|
||||
| 19 = @py_Name
|
||||
| 20 = @py_Num
|
||||
| 21 = @py_Repr
|
||||
| 22 = @py_Set
|
||||
| 23 = @py_SetComp
|
||||
| 24 = @py_Slice
|
||||
| 25 = @py_Starred
|
||||
| 26 = @py_Str
|
||||
| 27 = @py_Subscript
|
||||
| 28 = @py_Tuple
|
||||
| 29 = @py_UnaryExpr
|
||||
| 30 = @py_Yield
|
||||
| 31 = @py_YieldFrom
|
||||
| 32 = @py_TemplateDottedNotation
|
||||
| 33 = @py_Filter
|
||||
| 34 = @py_PlaceHolder
|
||||
| 35 = @py_Await
|
||||
| 36 = @py_Fstring
|
||||
| 37 = @py_FormattedValue
|
||||
| 38 = @py_AssignExpr
|
||||
| 39 = @py_SpecialOperation;
|
||||
|
||||
case @py_expr_context.kind of
|
||||
0 = @py_AugLoad
|
||||
@@ -755,6 +840,21 @@ case @py_operator.kind of
|
||||
| 11 = @py_Sub
|
||||
| 12 = @py_MatMult;
|
||||
|
||||
case @py_pattern.kind of
|
||||
0 = @py_MatchAsPattern
|
||||
| 1 = @py_MatchOrPattern
|
||||
| 2 = @py_MatchLiteralPattern
|
||||
| 3 = @py_MatchCapturePattern
|
||||
| 4 = @py_MatchWildcardPattern
|
||||
| 5 = @py_MatchValuePattern
|
||||
| 6 = @py_MatchSequencePattern
|
||||
| 7 = @py_MatchStarPattern
|
||||
| 8 = @py_MatchMappingPattern
|
||||
| 9 = @py_MatchDoubleStarPattern
|
||||
| 10 = @py_MatchKeyValuePattern
|
||||
| 11 = @py_MatchClassPattern
|
||||
| 12 = @py_MatchKeywordPattern;
|
||||
|
||||
case @py_stmt.kind of
|
||||
0 = @py_Assert
|
||||
| 1 = @py_Assign
|
||||
@@ -770,16 +870,18 @@ case @py_stmt.kind of
|
||||
| 11 = @py_If
|
||||
| 12 = @py_Import
|
||||
| 13 = @py_ImportStar
|
||||
| 14 = @py_Nonlocal
|
||||
| 15 = @py_Pass
|
||||
| 16 = @py_Print
|
||||
| 17 = @py_Raise
|
||||
| 18 = @py_Return
|
||||
| 19 = @py_Try
|
||||
| 20 = @py_While
|
||||
| 21 = @py_With
|
||||
| 22 = @py_TemplateWrite
|
||||
| 23 = @py_AnnAssign;
|
||||
| 14 = @py_MatchStmt
|
||||
| 15 = @py_Case
|
||||
| 16 = @py_Nonlocal
|
||||
| 17 = @py_Pass
|
||||
| 18 = @py_Print
|
||||
| 19 = @py_Raise
|
||||
| 20 = @py_Return
|
||||
| 21 = @py_Try
|
||||
| 22 = @py_While
|
||||
| 23 = @py_With
|
||||
| 24 = @py_TemplateWrite
|
||||
| 25 = @py_AnnAssign;
|
||||
|
||||
case @py_unaryop.kind of
|
||||
0 = @py_Invert
|
||||
@@ -793,9 +895,9 @@ case @py_unaryop.kind of
|
||||
|
||||
@py_arguments_parent = @py_FunctionExpr | @py_Lambda;
|
||||
|
||||
@py_ast_node = @py_Class | @py_Function | @py_Module | @py_StringPart | @py_comprehension | @py_dict_item | @py_expr | @py_stmt;
|
||||
@py_ast_node = @py_Class | @py_Function | @py_Module | @py_StringPart | @py_comprehension | @py_dict_item | @py_expr | @py_pattern | @py_stmt;
|
||||
|
||||
@py_bool_parent = @py_For | @py_Function | @py_Print | @py_With | @py_expr;
|
||||
@py_bool_parent = @py_For | @py_Function | @py_Print | @py_With | @py_expr | @py_pattern;
|
||||
|
||||
@py_dict_item_list_parent = @py_Call | @py_ClassExpr | @py_Dict;
|
||||
|
||||
@@ -805,15 +907,19 @@ case @py_unaryop.kind of
|
||||
|
||||
@py_expr_or_stmt = @py_expr | @py_stmt;
|
||||
|
||||
@py_expr_parent = @py_AnnAssign | @py_Assert | @py_Assign | @py_AssignExpr | @py_Attribute | @py_AugAssign | @py_Await | @py_BinaryExpr | @py_Call | @py_Compare | @py_DictComp | @py_DictUnpacking | @py_ExceptStmt | @py_Exec | @py_Expr_stmt | @py_Filter | @py_For | @py_FormattedValue | @py_Function | @py_FunctionExpr | @py_GeneratorExp | @py_If | @py_IfExp | @py_ImportMember | @py_ImportStar | @py_KeyValuePair | @py_ListComp | @py_Print | @py_Raise | @py_Repr | @py_Return | @py_SetComp | @py_Slice | @py_Starred | @py_Subscript | @py_TemplateDottedNotation | @py_TemplateWrite | @py_UnaryExpr | @py_While | @py_With | @py_Yield | @py_YieldFrom | @py_alias | @py_arguments | @py_comprehension | @py_expr_list | @py_keyword | @py_parameter_list;
|
||||
@py_expr_parent = @py_AnnAssign | @py_Assert | @py_Assign | @py_AssignExpr | @py_Attribute | @py_AugAssign | @py_Await | @py_BinaryExpr | @py_Call | @py_Case | @py_Compare | @py_DictComp | @py_DictUnpacking | @py_ExceptStmt | @py_Exec | @py_Expr_stmt | @py_Filter | @py_For | @py_FormattedValue | @py_Function | @py_FunctionExpr | @py_GeneratorExp | @py_Guard | @py_If | @py_IfExp | @py_ImportMember | @py_ImportStar | @py_KeyValuePair | @py_ListComp | @py_MatchAsPattern | @py_MatchCapturePattern | @py_MatchClassPattern | @py_MatchKeywordPattern | @py_MatchLiteralPattern | @py_MatchStmt | @py_MatchValuePattern | @py_Print | @py_Raise | @py_Repr | @py_Return | @py_SetComp | @py_Slice | @py_Starred | @py_Subscript | @py_TemplateDottedNotation | @py_TemplateWrite | @py_UnaryExpr | @py_While | @py_With | @py_Yield | @py_YieldFrom | @py_alias | @py_arguments | @py_comprehension | @py_expr_list | @py_keyword | @py_parameter_list;
|
||||
|
||||
@py_location_parent = @py_DictUnpacking | @py_KeyValuePair | @py_StringPart | @py_comprehension | @py_expr | @py_keyword | @py_stmt;
|
||||
@py_location_parent = @py_DictUnpacking | @py_KeyValuePair | @py_StringPart | @py_comprehension | @py_expr | @py_keyword | @py_pattern | @py_stmt;
|
||||
|
||||
@py_parameter = @py_Name | @py_Tuple;
|
||||
|
||||
@py_pattern_list_parent = @py_MatchClassPattern | @py_MatchMappingPattern | @py_MatchOrPattern | @py_MatchSequencePattern;
|
||||
|
||||
@py_pattern_parent = @py_Case | @py_MatchAsPattern | @py_MatchDoubleStarPattern | @py_MatchKeyValuePattern | @py_MatchKeywordPattern | @py_MatchStarPattern | @py_pattern_list;
|
||||
|
||||
@py_scope = @py_Class | @py_Function | @py_Module;
|
||||
|
||||
@py_stmt_list_parent = @py_Class | @py_ExceptStmt | @py_For | @py_Function | @py_If | @py_Module | @py_Try | @py_While | @py_With;
|
||||
@py_stmt_list_parent = @py_Case | @py_Class | @py_ExceptStmt | @py_For | @py_Function | @py_If | @py_MatchStmt | @py_Module | @py_Try | @py_While | @py_With;
|
||||
|
||||
@py_str_list_parent = @py_Global | @py_Nonlocal;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user