class RubyVM::AbstractSyntaxTree::Location - Documentation for Ruby 4.0
Description: class RubyVM::AbstractSyntaxTree::Location: Node#locations. This class is MRI specific.
Keywords: ruby,class,RubyVM::AbstractSyntaxTree::Location

🔍

No recent searches

# class RubyVM::AbstractSyntaxTree::Location

`RubyVM::AbstractSyntaxTree::Location` instances are created by `RubyVM::AbstractSyntaxTree::Node#locations`.

This class is MRI specific.

### Public Instance Methods

first_column → integer
Source

    # File ast.rb, line 304
    def first_column
      Primitive.ast_location_first_column
    end

The column number in the source code where this AST’s text began.

first_lineno → integer
Source

    # File ast.rb, line 296
    def first_lineno
      Primitive.ast_location_first_lineno
    end

The line number in the source code where this AST’s text began.

inspect → string
Source

    # File ast.rb, line 328
    def inspect
      Primitive.ast_location_inspect
    end

Returns debugging information about this location as a string.

last_column → integer
Source

    # File ast.rb, line 320
    def last_column
      Primitive.ast_location_last_column
    end

The column number in the source code where this AST’s text ended.

last_lineno → integer
Source

    # File ast.rb, line 312
    def last_lineno
      Primitive.ast_location_last_lineno
    end

The line number in the source code where this AST’s text ended.