Class: Parser::Diagnostic
Overview
source://parser//lib/parser/diagnostic.rb#31
Defined Under Namespace
Classes: Engine
Constant Summary collapse
- LEVELS =
          
Collection of the available diagnostic levels.
source://parser//lib/parser/diagnostic.rb#37
 T.let(T.unsafe(nil), Array)
Instance Method Summary collapse
- 
  
    
      #arguments  ⇒ Symbol 
    
    
  
  
  
  
  
  
  
  
  
    
source://parser//lib/parser/diagnostic.rb#39.
 - 
  
    
      #highlights  ⇒ Array<Parser::Source::Range> 
    
    
  
  
  
  
  
  
  
  
  
    
Supplementary error-related source ranges.
 - 
  
    
      #initialize(level, reason, arguments, location, highlights = T.unsafe(nil))  ⇒ Diagnostic 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
source://parser//lib/parser/diagnostic.rb#49.
 - 
  
    
      #level  ⇒ Symbol 
    
    
  
  
  
  
  
  
  
  
  
    
source://parser//lib/parser/diagnostic.rb#39.
 - 
  
    
      #location  ⇒ Parser::Source::Range 
    
    
  
  
  
  
  
  
  
  
  
    
Main error-related source range.
 - 
  
    
      #message  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
source://parser//lib/parser/diagnostic.rb#69.
 - 
  
    
      #reason  ⇒ Symbol 
    
    
  
  
  
  
  
  
  
  
  
    
source://parser//lib/parser/diagnostic.rb#39.
 - 
  
    
      #render  ⇒ Array<String> 
    
    
  
  
  
  
  
  
  
  
  
    
Renders the diagnostic message as a clang-like diagnostic.
 
Constructor Details
#initialize(level, reason, arguments, location, highlights = T.unsafe(nil)) ⇒ Diagnostic
source://parser//lib/parser/diagnostic.rb#49
      1720  | 
    
      # File 'sorbet/rbi/parser@3.3.8.0.rbi', line 1720 def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end  | 
  
Instance Method Details
#arguments ⇒ Symbol
source://parser//lib/parser/diagnostic.rb#39
      1727  | 
    
      # File 'sorbet/rbi/parser@3.3.8.0.rbi', line 1727 def arguments; end  | 
  
#highlights ⇒ Array<Parser::Source::Range>
Supplementary error-related source ranges.
source://parser//lib/parser/diagnostic.rb#40
      1735  | 
    
      # File 'sorbet/rbi/parser@3.3.8.0.rbi', line 1735 def highlights; end  | 
  
#level ⇒ Symbol
source://parser//lib/parser/diagnostic.rb#39
      1742  | 
    
      # File 'sorbet/rbi/parser@3.3.8.0.rbi', line 1742 def level; end  | 
  
#location ⇒ Parser::Source::Range
Main error-related source range.
source://parser//lib/parser/diagnostic.rb#40
      1750  | 
    
      # File 'sorbet/rbi/parser@3.3.8.0.rbi', line 1750 def location; end  | 
  
#message ⇒ String
source://parser//lib/parser/diagnostic.rb#69
      1756  | 
    
      # File 'sorbet/rbi/parser@3.3.8.0.rbi', line 1756 def ; end  | 
  
#reason ⇒ Symbol
source://parser//lib/parser/diagnostic.rb#39
      1763  | 
    
      # File 'sorbet/rbi/parser@3.3.8.0.rbi', line 1763 def reason; end  |