• Kipper

    v0.12.1
  • Downloads

  • Docs

  • Playground

  • Changelog

  • Kipper

    v0.12.1
    • Downloads

    • Docs

    • Playground

    • Changelog

      • 0.11.0 /
      • Kipper API /
      • Module /
      • @kipper/core /
      • compiler
    Kipper Docs
    • next
    • latest
    • 0.11.0
    • 0.10.4
    • 0.9.2
    • Overview

    • Quickstart

    • Goals for Kipper

    • Supported platforms

    • Usage Examples

      • Overview

      • Compiler Setup

        • Overview

          • index

          • compiler

          • errors

          • logger

          • utils

          • config

          • index

          • index

        • Overview

        • new

        • run

        • compile

        • help

        • version

    • Variables

      • Overview

      • String Type

      • Number Type

      • Boolean Type

      • Void Type

      • Null Type

      • Undefined Type

      • Array Type

      • Overview

      • Arithmetic Expression

      • Assignment Expression

      • Conditional Expressions

      • Logical Expressions

      • Bitwise Expression

      • Relational Expressions

      • Convert Expression

      • F-String Expression

      • Member Access Expression

      • Function Call Expression

      • Overview

      • Expression Statement

      • If Statement

      • While Loop

      • Do-While Loop

      • For Loop

      • Compound Statement

      • Jump Statement

    • Functions

    • Comments

    • Built-in Functions

      • 0.11.0 /
      • Kipper API /
      • Module /
      • @kipper/core /
      • compiler
    • 0.11.0 /
    • Kipper API /
    • Module /
    • @kipper/core /
    • compiler

    Edit page

    Class: IfStatementContext

    compiler.IfStatementContext

    A custom implementation of the Antlr4 ParserRuleContext class, representing a node in the parse tree.

    Since

    0.10.0

    Hierarchy

    • KipperParserRuleContext

      ↳ IfStatementContext

    Table of contents

    Constructors

    • constructor

    Accessors

    • astSyntaxKind
    • labelASTKind
    • ruleIndex

    Methods

    • Else
    • If
    • LeftParen
    • RightParen
    • accept
    • enterRule
    • exitRule
    • expression
    • statement

    Constructors

    constructor

    • new IfStatementContext(parent, invokingState)

    Parameters

    Name Type
    parent undefined | ParserRuleContext
    invokingState number

    Overrides

    KipperParserRuleContext.constructor

    Defined in

    kipper/core/src/compiler/lexer-parser/antlr/KipperParser.ts:5962

    Accessors

    astSyntaxKind

    • get astSyntaxKind(): ASTKind

    Returns the specific unique kind number of this rule ctx. This is used to map the rule ctx to the correct AST node.

    For more info on this, see ParseRuleKindMapping and the documentation provided.

    Since

    0.10.0

    Returns

    ASTKind

    Inherited from

    KipperParserRuleContext.astSyntaxKind

    Defined in

    kipper/core/src/compiler/lexer-parser/parser-rule-context.ts:37


    labelASTKind

    • get labelASTKind(): undefined | ASTKind

    Returns the AST-specific label kind number of this rule ctx. This is defined if the rule ctx is a labelled alternative of a rule and the ruleIndex would only return the parent rule's kind number.

    Since

    0.10.0

    Returns

    undefined | ASTKind

    Inherited from

    KipperParserRuleContext.labelASTKind

    Defined in

    kipper/core/src/compiler/lexer-parser/parser-rule-context.ts:26


    ruleIndex

    • get ruleIndex(): number

    Returns

    number

    Overrides

    KipperParserRuleContext.ruleIndex

    Defined in

    kipper/core/src/compiler/lexer-parser/antlr/KipperParser.ts:5967

    Methods

    Else

    ▸ Else(): undefined | TerminalNode

    Returns

    undefined | TerminalNode

    Defined in

    kipper/core/src/compiler/lexer-parser/antlr/KipperParser.ts:5999


    If

    ▸ If(): TerminalNode

    Returns

    TerminalNode

    Defined in

    kipper/core/src/compiler/lexer-parser/antlr/KipperParser.ts:5971


    LeftParen

    ▸ LeftParen(): TerminalNode

    Returns

    TerminalNode

    Defined in

    kipper/core/src/compiler/lexer-parser/antlr/KipperParser.ts:5975


    RightParen

    ▸ RightParen(): TerminalNode

    Returns

    TerminalNode

    Defined in

    kipper/core/src/compiler/lexer-parser/antlr/KipperParser.ts:5983


    accept

    ▸ accept<Result>(visitor): Result

    Type parameters

    Name
    Result

    Parameters

    Name Type
    visitor KipperParserVisitor<Result>

    Returns

    Result

    Overrides

    KipperParserRuleContext.accept

    Defined in

    kipper/core/src/compiler/lexer-parser/antlr/KipperParser.ts:6018


    enterRule

    ▸ enterRule(listener): void

    Parameters

    Name Type
    listener KipperParserListener

    Returns

    void

    Overrides

    KipperParserRuleContext.enterRule

    Defined in

    kipper/core/src/compiler/lexer-parser/antlr/KipperParser.ts:6004


    exitRule

    ▸ exitRule(listener): void

    Parameters

    Name Type
    listener KipperParserListener

    Returns

    void

    Overrides

    KipperParserRuleContext.exitRule

    Defined in

    kipper/core/src/compiler/lexer-parser/antlr/KipperParser.ts:6011


    expression

    ▸ expression(): ExpressionContext

    Returns

    ExpressionContext

    Defined in

    kipper/core/src/compiler/lexer-parser/antlr/KipperParser.ts:5979


    statement

    ▸ statement(): StatementContext[]

    Returns

    StatementContext[]

    Defined in

    kipper/core/src/compiler/lexer-parser/antlr/KipperParser.ts:5987

    ▸ statement(i): StatementContext

    Parameters

    Name Type
    i number

    Returns

    StatementContext

    Defined in

    kipper/core/src/compiler/lexer-parser/antlr/KipperParser.ts:5989

  • Developed at:

    • Releases
    • GitHub
    • Security
    • Issue Tracker
    • License
  • Copyright © 2021-2026 Luna Klatzer, 2024-2025 Lorenz Holzbauer & Fabian Baitura.
    Kipper is licensed under the GPL-3.0-or-later license.