Opened 8 years ago

Closed 7 years ago

#12269 closed defect (fixed)

parser crash when using Dojo Documentation Tools

Reported by: phk Owned by: dante
Priority: low Milestone: 1.8
Component: Doc parser Version: 1.6.0b1
Keywords: Cc: Adam Peller
Blocked By: Blocking:

Description

Hello,

I'm using the api doc generator in util/docscripts, and the parser happens to crash when it processes dojo code like:

smallest = ((pos1 < pos2 ? pos1 : pos2));

If I remove the extra "( )", the parsing step completes without error.

Change History (6)

comment:1 Changed 8 years ago by Tom Trenka

Owner: changed from Neil Roberts to Tom Trenka

Can you paste the exact error you are seeing here? Screen shot would probably be fine.

comment:2 Changed 8 years ago by Adam Peller

Cc: Adam Peller added; apeller@… removed

comment:3 Changed 8 years ago by phk

Here is the error I get:

[INFO] xxx/graphlayout/Direction.js 1,091 KB [INFO] xxx/graphlayout/GraphLayout.js 1,232 KB [INFO] [INFO] Fatal error: Call to a member function convert() on a non-object in xxx/util/docscripts/lib/parser2/JavaScriptAssignment.php on line 32 [INFO] PHP Notice: Undefined index: HTTP_HOST in xxx/util/docscripts/generate.php on line 17 [INFO] PHP Fatal error: Call to a member function convert() on a non-object in xxx/util/docscripts/lib/parser2/JavaScriptAssignment.php on line 32

To reproduce, add this code to any .js:

var pos1 = 2; var pos2 = 3; var smallest = ((pos1 < pos2 ? pos1 : pos2));

comment:4 Changed 8 years ago by phk

(repost with better formatting)

Here is the error I get:

[INFO] xxx/graphlayout/Direction.js 1,091 KB

[INFO] xxx/graphlayout/GraphLayout.js 1,232 KB

[INFO]

[INFO] Fatal error: Call to a member function convert() on a non-object in xxx/util/docscripts/lib/parser2/JavaScriptAssignment.php on line 32

[INFO] PHP Notice: Undefined index: HTTP_HOST in xxx/util/docscripts/generate.php on line 17

[INFO] PHP Fatal error: Call to a member function convert() on a non-object in xxx/util/docscripts/lib/parser2/JavaScriptAssignment.php on line 32

To reproduce, add this code to any .js:

var pos1 = 2; 
var pos2 = 3; 
var smallest = ((pos1 < pos2 ? pos1 : pos2));

comment:5 Changed 7 years ago by Tom Trenka

Owner: changed from Tom Trenka to dante
Priority: highlow
Status: newassigned

Reassigning to Pete for now, since he's been doing "fixes" on the parser. May end up being irrelevant once the JS-based parser is implemented.

comment:6 Changed 7 years ago by bill

Milestone: tbd1.8
Resolution: fixed
Status: assignedclosed

Colin rewrote the parser completely (see https://github.com/wkeese/api-viewer/blob/master/README.rst for instructions), so presumably this is fixed now.

Note: See TracTickets for help on using tickets.