Class: TexLogParser::RunawayParameterError

Inherits:
Object
  • Object
show all
Includes:
LogParser::RegExpPattern
Defined in:
lib/tex_log_parser/patterns/runaway_parameter_error.rb

Overview

Matches messages of this form:

Runaway argument?
{Test. Also, it contains some \ref {warnings} and \ref {errors} for t\ETC.

Instance Method Summary collapse

Methods included from LogParser::RegExpPattern

#begins_at?

Methods included from LogParser::Pattern

#begins_at?

Constructor Details

#initializeRunawayParameterError

Creates a new instance.

[View source]

12
13
14
15
16
# File 'lib/tex_log_parser/patterns/runaway_parameter_error.rb', line 12

def initialize
  super(/^Runaway argument\?/,
        { pattern: ->(_) { /./ }, until: :match, inclusive: true }
  )
end

Instance Method Details

#read(lines) ⇒ Array<(Message, Int)>

Reads a message from the given lines.

Parameters:

Returns:

  • (Array<(Message, Int)>)

    An array of the message that was read, and the number of lines that it spans.

Raises:

  • If no message end could be found among the given lines.

[View source]

19
20
21
22
23
24
25
26
# File 'lib/tex_log_parser/patterns/runaway_parameter_error.rb', line 19

def read(lines)
  # @type [Message] msg
  msg, consumed = super(lines)

  msg.level = :error

  [msg, consumed]
end