mirror of
https://github.com/github/codeql.git
synced 2026-05-14 03:09:26 +02:00
unified: Unify more fields
Not entirely happy about the mixed nature of the `kind` filed (having both tokens and the named node `throw_keyword` in there), but that's a problem for a different time.
This commit is contained in:
@@ -1266,7 +1266,10 @@ module.exports = grammar({
|
||||
),
|
||||
control_transfer_statement: ($) =>
|
||||
choice(
|
||||
prec.right(PRECS.control_transfer, $._throw_statement),
|
||||
prec.right(
|
||||
PRECS.control_transfer,
|
||||
seq(field("kind", $.throw_keyword), field("result", $.expression))
|
||||
),
|
||||
prec.right(
|
||||
PRECS.control_transfer,
|
||||
seq(
|
||||
|
||||
@@ -220,8 +220,7 @@ named:
|
||||
lambda*: lambda_literal
|
||||
name*: simple_identifier
|
||||
control_transfer_statement:
|
||||
$children*: [expression, throw_keyword]
|
||||
kind?: ["break", "continue", "return", "yield"]
|
||||
kind: ["break", "continue", "return", throw_keyword, "yield"]
|
||||
result?: expression
|
||||
custom_operator:
|
||||
default_keyword:
|
||||
|
||||
Reference in New Issue
Block a user