This commit is contained in:
Arthur Baars 2023-02-08 13:31:42 +01:00
Родитель e382d6d000
Коммит 78ad9d67b4
3 изменённых файлов: 13 добавлений и 13 удалений

Просмотреть файл

@ -557,7 +557,7 @@ class MatchPattern extends Expr, TMatchPattern {
/**
* Gets the expression being compared, if any. For example, `foo` in the following example.
* ```rb
* case foo => Point{ x:, y: }
* foo => Point{ x:, y: }
* ```
*/
final Expr getValue() { toGenerated(result) = g.getValue() }
@ -598,13 +598,13 @@ class TestPattern extends Expr, TTestPattern {
/**
* Gets the expression being compared, if any. For example, `foo` in the following example.
* ```rb
* case foo in Point{ x:, y: }
* foo in Point{ x:, y: }
* ```
*/
final Expr getValue() { toGenerated(result) = g.getValue() }
/**
* Gets the pattern in this `=>` expression. In the
* Gets the pattern in this `in` expression. In the
* following example, the pattern is `Point{ x:, y: }`.
* ```rb
* foo in Point{ x:, y: }

Просмотреть файл

@ -133,7 +133,7 @@ private module Cached {
TDo(Ruby::Do g) or
TDoBlock(Ruby::DoBlock g) { not g.getParent() instanceof Ruby::Lambda } or
TElementReference(Ruby::ElementReference g) or
TElse(Ruby::Else g) or
TElseReal(Ruby::Else g) or
TElseSynth(Ast::AstNode parent, int i) { mkSynthChild(ElseKind(), parent, i) } or
TElsif(Ruby::Elsif g) or
TEmptyStmt(Ruby::EmptyStatement g) or
@ -355,10 +355,10 @@ private module Cached {
TBraceBlockReal or TBreakStmt or TCaseEqExpr or TCaseExpr or TCaseMatchReal or
TCharacterLiteral or TClassDeclaration or TClassVariableAccessReal or TComplementExpr or
TComplexLiteral or TDefinedExpr or TDelimitedSymbolLiteral or TDestructuredLeftAssignment or
TDestructuredParameter or TDivExprReal or TDo or TDoBlock or TElementReference or TElse or
TElsif or TEmptyStmt or TEncoding or TEndBlock or TEnsure or TEqExpr or TExponentExprReal or
TFalseLiteral or TFile or TFindPattern or TFloatLiteral or TForExpr or TForwardParameter or
TForwardArgument or TGEExpr or TGTExpr or TGlobalVariableAccessReal or
TDestructuredParameter or TDivExprReal or TDo or TDoBlock or TElementReference or
TElseReal or TElsif or TEmptyStmt or TEncoding or TEndBlock or TEnsure or TEqExpr or
TExponentExprReal or TFalseLiteral or TFile or TFindPattern or TFloatLiteral or TForExpr or
TForwardParameter or TForwardArgument or TGEExpr or TGTExpr or TGlobalVariableAccessReal or
THashKeySymbolLiteral or THashLiteral or THashPattern or THashSplatExpr or
THashSplatNilParameter or THashSplatParameter or THereDoc or TIdentifierMethodCall or
TIfReal or TIfModifierExpr or TInClauseReal or TInstanceVariableAccessReal or
@ -445,7 +445,7 @@ private module Cached {
n = TDoBlock(result) or
n = TDo(result) or
n = TElementReference(result) or
n = TElse(result) or
n = TElseReal(result) or
n = TElsif(result) or
n = TEmptyStmt(result) or
n = TEncoding(result) or
@ -703,7 +703,7 @@ class TConstantAccess =
TTokenConstantAccess or TScopeResolutionConstantAccess or TNamespace or
TConstantReadAccessSynth or TConstantWriteAccessSynth;
class TControlExpr = TConditionalExpr or TCaseExpr or TCaseMatchReal or TCaseMatchSynth or TLoop;
class TControlExpr = TConditionalExpr or TCaseExpr or TCaseMatch or TLoop;
class TConditionalExpr =
TIfExpr or TUnlessExpr or TIfModifierExpr or TUnlessModifierExpr or TTernaryIfExpr;
@ -729,7 +729,7 @@ class TExpr =
class TSplatExpr = TSplatExprReal or TSplatExprSynth;
class TStmtSequence =
TBeginBlock or TEndBlock or TThen or TElse or TElseSynth or TDo or TEnsure or
TBeginBlock or TEndBlock or TThen or TElseReal or TElseSynth or TDo or TEnsure or
TStringInterpolationComponent or TBlock or TBodyStmt or TParenthesizedExpr or
TStmtSequenceSynth;

Просмотреть файл

@ -19,10 +19,10 @@ class Then extends StmtSequence, TThen {
final override string toString() { result = "then ..." }
}
class Else extends StmtSequence, TElse {
class Else extends StmtSequence, TElseReal {
private Ruby::Else g;
Else() { this = TElse(g) }
Else() { this = TElseReal(g) }
override Stmt getStmt(int n) { toGenerated(result) = g.getChild(n) }