fuzzilli icon indicating copy to clipboard operation
fuzzilli copied to clipboard

Unhandled node type ConditionalExpression

Open nth10sd opened this issue 1 year ago • 1 comments

node parser.js ../../Protobuf/ast.proto code.js output.ast.proto

code.js:

1 ? 0 : 0;

Are ternary operators on latest rev d386a838 supported yet?

<repo>/Sources/Fuzzilli/Compiler/Parser/parser.js:556
                throw "Unhandled node type " + node.type;
                ^
Unhandled node type ConditionalExpression
Thrown at:
    at visitExpression (<repo>/Sources/Fuzzilli/Compiler/Parser/parser.js:556:17)
    at visitStatement (<repo>/Sources/Fuzzilli/Compiler/Parser/parser.js:119:28)
    at visitProgram (<repo>/Sources/Fuzzilli/Compiler/Parser/parser.js:51:37)
    at parse (<repo>/Sources/Fuzzilli/Compiler/Parser/parser.js:561:12)
    at <repo>/Sources/Fuzzilli/Compiler/Parser/parser.js:570:15
    at finish (<repo>/Sources/Fuzzilli/Compiler/Parser/node_modules/protobufjs/src/root.js:105:9)
    at process (<repo>/Sources/Fuzzilli/Compiler/Parser/node_modules/protobufjs/src/root.js:143:13)
    at <repo>/Sources/Fuzzilli/Compiler/Parser/node_modules/protobufjs/src/root.js:195:17
    at fetchReadFileCallback (<repo>/Sources/Fuzzilli/Compiler/Parser/node_modules/@protobufjs/fetch/index.js:51:19)
    at readFileAfterClose (node:internal/fs/read/context:68:3)

nth10sd avatar Jan 15 '24 20:01 nth10sd

Hi! The parser/compiler isn't feature complete, but we're happy to take pull requests! This is probably relatively easy to implement since we do support ternary operators in the IL.

saelo avatar Jan 18 '24 20:01 saelo

@TobiasWienand @saelo Perhaps this is fixed by #438?

nth10sd avatar Jul 27 '24 06:07 nth10sd

Right, this should indeed be fixed now!

saelo avatar Jul 30 '24 16:07 saelo