PATH: //opt/alt/ruby33/share/ruby/syntax_suggest
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 api.rb
↓
X
📄 around_block_scan.rb
↓
X
📄 block_expand.rb
↓
X
📁 capture/
X
📄 capture_code_context.rb
↓
X
📄 clean_document.rb
↓
X
📄 cli.rb
↓
X
📄 code_block.rb
↓
X
📄 code_frontier.rb
↓
X
📄 code_line.rb
↓
X
📄 code_search.rb
↓
X
📄 core_ext.rb
↓
X
📄 display_code_with_line_numbers.rb
↓
X
📄 display_invalid_blocks.rb
↓
X
📄 explain_syntax.rb
↓
X
📄 left_right_lex_count.rb
↓
X
📄 lex_all.rb
↓
X
📄 lex_value.rb
↓
X
📄 parse_blocks_from_indent_line.rb
↓
X
📄 pathname_from_message.rb
↓
X
📄 priority_engulf_queue.rb
↓
X
📄 priority_queue.rb
↓
X
📄 ripper_errors.rb
↓
X
📄 scan_history.rb
↓
X
📄 unvisited_lines.rb
↓
X
📄 version.rb
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: ripper_errors.rb
# frozen_string_literal: true module SyntaxSuggest # Capture parse errors from Ripper # # Prism returns the errors with their messages, but Ripper # does not. To get them we must make a custom subclass. # # Example: # # puts RipperErrors.new(" def foo").call.errors # # => ["syntax error, unexpected end-of-input, expecting ';' or '\\n'"] class RipperErrors < Ripper attr_reader :errors # Comes from ripper, called # on every parse error, msg # is a string def on_parse_error(msg) @errors ||= [] @errors << msg end alias_method :on_alias_error, :on_parse_error alias_method :on_assign_error, :on_parse_error alias_method :on_class_name_error, :on_parse_error alias_method :on_param_error, :on_parse_error alias_method :compile_error, :on_parse_error def call @run_once ||= begin @errors = [] parse true end self end end end
SIMPAN PERUBAHAN