Module: Oxc::Diagnosed

Included in:
ParseResult, Result
Defined in:
lib/oxc/diagnosed.rb,
sig/oxc/diagnosed.rbs

Instance Method Summary collapse

Instance Method Details

#errorsArray[Oxc::Diagnostic]

: () -> Array

Returns:



9
10
11
# File 'lib/oxc/diagnosed.rb', line 9

def errors
  diagnostics.select(&:error?)
end

#errors?Boolean

: () -> bool

Returns:

  • (Boolean)


19
20
21
# File 'lib/oxc/diagnosed.rb', line 19

def errors?
  !errors.empty?
end

#panicked?Boolean

: () -> bool

Returns:

  • (Boolean)


29
30
31
# File 'lib/oxc/diagnosed.rb', line 29

def panicked?
  @panicked
end

#warningsArray[Oxc::Diagnostic]

: () -> Array

Returns:



14
15
16
# File 'lib/oxc/diagnosed.rb', line 14

def warnings
  diagnostics.select(&:warning?)
end

#warnings?Boolean

: () -> bool

Returns:

  • (Boolean)


24
25
26
# File 'lib/oxc/diagnosed.rb', line 24

def warnings?
  !warnings.empty?
end