Convert rust-exp.y to use operations
authorTom Tromey <tom@tromey.com>
Mon, 8 Mar 2021 14:27:57 +0000 (07:27 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 8 Mar 2021 14:28:38 +0000 (07:28 -0700)
commitc1299a23448227e9bb57df883aba0118618db9f4
treefab842592427b927fd810a301f271ed74af066eb
parent4c5e7a930a46ddd6844eb7aede3ef60df535bc33
Convert rust-exp.y to use operations

This converts the Rust parser to generate operations rather than
exp_elements.

The Rust parser already made its own AST, that it then lowered to GDB
expressions.  Ironically, this made conversion trickier, rather than
simpler, than the other parsers, primarily due to the way that binary
operations were lowered.  Perhaps in the future, converting the Rust
parser to directly create operations while parsing would be
worthwhile.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

* rust-exp.y: Create operations.
(rust_parser::convert_params_to_expression): Change return type.
(binop_maker_ftype): New typedef.
(maker_map): New global.
(rust_parser::convert_ast_to_expression): Change return type.
(rust_language::parser): Update.
(_initialize_rust_exp): Initialize maker_map.
gdb/ChangeLog
gdb/rust-exp.y
This page took 0.024556 seconds and 4 git commands to generate.