Class: Oselvar::Var::Core::Span

Inherits:
Data
  • Object
show all
Defined in:
lib/oselvar/var/core/span.rb

Overview

A source span. Offsets and columns are UTF-16 code units (an astral character like 😀 counts as 2), matching the goldens and LSP's default position encoding. Lines/cols are 1-based.

Instance Attribute Summary collapse

Instance Attribute Details

#end_colObject (readonly)

Returns the value of attribute end_col

Returns:

  • (Object)

    the current value of end_col



9
10
11
# File 'lib/oselvar/var/core/span.rb', line 9

def end_col
  @end_col
end

#end_lineObject (readonly)

Returns the value of attribute end_line

Returns:

  • (Object)

    the current value of end_line



9
10
11
# File 'lib/oselvar/var/core/span.rb', line 9

def end_line
  @end_line
end

#end_offsetObject (readonly)

Returns the value of attribute end_offset

Returns:

  • (Object)

    the current value of end_offset



9
10
11
# File 'lib/oselvar/var/core/span.rb', line 9

def end_offset
  @end_offset
end

#start_colObject (readonly)

Returns the value of attribute start_col

Returns:

  • (Object)

    the current value of start_col



9
10
11
# File 'lib/oselvar/var/core/span.rb', line 9

def start_col
  @start_col
end

#start_lineObject (readonly)

Returns the value of attribute start_line

Returns:

  • (Object)

    the current value of start_line



9
10
11
# File 'lib/oselvar/var/core/span.rb', line 9

def start_line
  @start_line
end

#start_offsetObject (readonly)

Returns the value of attribute start_offset

Returns:

  • (Object)

    the current value of start_offset



9
10
11
# File 'lib/oselvar/var/core/span.rb', line 9

def start_offset
  @start_offset
end