Closed AlexWeinstein92 closed 3 weeks ago
The behavior of that function is to not return the RPI's top level thing because it could be a string and because the programmer already knows about it. It only returns the URLs of the include statements. If your parse has no includes, you'll get an empty list.
Furthermore, if a parsing error occurs before a single include file has been seen, you won't get anything in that list because the parse is terminated before an include could be processed. Parsing has no ability to correct itself and keep parsing like some compilers do. Consequently, a parsing error will terminate the parsing of THAT file, but other parsers of include files will continue because a new parser is started for each file.
Just needed a clean
Symptom
The test for failure of
parseRootWithURLs
expects an emptySeq
; the URLs on failure are essential to an ongoing task in the pluginExpected Behavior
When
parseRootWithURLs
returnLeft
, theURL
s element in the tuples should be populated Ideally theURL
s and theMessage.At
s would be grouped together so they can be referenced against each other more accuratelySteps To Reproduce
Option 1: Run test
return URLs on failure
inTopLevelParserTest
Option 2: Write a java script usingTopLevelParser
and make it fail with error messages