ifStatement abstract method

IfStatement ifStatement(
  1. Token ifKeyword,
  2. Token leftParenthesis,
  3. Expression condition,
  4. Token rightParenthesis,
  5. Statement thenStatement,
  6. Token? elseKeyword,
  7. Statement? elseStatement,
)

Returns a newly created if statement. The elseKeyword and elseStatement can be null if there is no else clause.

Implementation

IfStatement ifStatement(
    Token ifKeyword,
    Token leftParenthesis,
    Expression condition,
    Token rightParenthesis,
    Statement thenStatement,
    Token? elseKeyword,
    Statement? elseStatement);