D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
SyntaxSuggest
/
ExplainSyntax
/
Filename :
cdesc-ExplainSyntax.ri
back
Copy
U:RDoc::NormalClass[iI"ExplainSyntax:ETI"!SyntaxSuggest::ExplainSyntax;TI"Object;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"1Explains syntax errors based on their source;To:RDoc::Markup::BlankLine o; ;[I" example:;T@o:RDoc::Markup::Verbatim;[I"7source = "def foo; puts 'lol'" # Note missing end ;TI" explain ExplainSyntax.new( ;TI"0 code_lines: CodeLine.from_source(source) ;TI").call ;TI"explain.errors.first ;TI"/# => "Unmatched keyword, missing `end' ?" ;T:@format0o; ;[I"=When the error cannot be determined by lexical counting ;TI":then the parser is run against the input and the raw ;TI"errors are returned.;T@o; ;[I" Example:;T@o;;[I"4source = "1 * " # Note missing a second number ;TI" explain ExplainSyntax.new( ;TI"0 code_lines: CodeLine.from_source(source) ;TI").call ;TI"explain.errors.first ;TI"1# => "syntax error, unexpected end-of-input";T;0: @fileI")lib/syntax_suggest/explain_syntax.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[ [U:RDoc::Constant[i I"INVERSE;TI"*SyntaxSuggest::ExplainSyntax::INVERSE;T:public0o;;[ ; @-;0@-@cRDoc::NormalClass0[ [[I" class;T[[;[[I"new;TI")lib/syntax_suggest/explain_syntax.rb;T[:protected[ [:private[ [I" instance;T[[;[ [I" call;T@@[I"errors;T@@[I"missing;T@@[I"why;T@@[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ; 0;0[@-I"SyntaxSuggest;TcRDoc::NormalModule