lib/support/base_tokenizer.rb in rley-0.7.03 vs lib/support/base_tokenizer.rb in rley-0.7.04

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'strscan' require_relative '../rley/lexical/token' class BaseTokenizer attr_reader(:scanner) @@ -64,12 +66,12 @@ begin value = convert_to(aLexeme, aSymbolName, aFormat) col = scanner.pos - aLexeme.size - @line_start + 1 pos = Rley::Lexical::Position.new(@lineno, col) token = Rley::Lexical::Token.new(value, aSymbolName, pos) - rescue StandardError => exc + rescue StandardError => e puts "Failing with '#{aSymbolName}' and '#{aLexeme}'" - raise exc + raise e end return token end