aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-ast-resolve.cc
diff options
context:
space:
mode:
authorJoel Phillips <simplytheother@gmail.com>2022-10-21 13:39:04 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2022-12-13 14:00:04 +0100
commit35e4f3b4af4c4e9a883b40603199eea09f9cd9f0 (patch)
treeb2de99d8f36f78cab0a30ba4fc12ae1b558ea2cc /gcc/rust/resolve/rust-ast-resolve.cc
parent18f6990f842d0bdcb2cf9541ca98d67b414d5802 (diff)
downloadgcc-35e4f3b4af4c4e9a883b40603199eea09f9cd9f0.zip
gcc-35e4f3b4af4c4e9a883b40603199eea09f9cd9f0.tar.gz
gcc-35e4f3b4af4c4e9a883b40603199eea09f9cd9f0.tar.bz2
gccrs: Add Parser for Rust front-end pt.1
This is a Pratt-style parser for Rust that implements all of the AST. The rust-parser-impl.h is the implementation of the parser as a template, allowing it to be given ManagedTokenSource and avoid virtual calls. The downside is it takes time to compile when used. see: https://en.wikipedia.org/wiki/Operator-precedence_parser#Pratt_parsing This patch contains the first half of the templated parser, so as to not lose patches in the mailing list archives. gcc/rust/ * parse/rust-cfg-parser.cc: New. * parse/rust-cfg-parser.h: New. * parse/rust-parse-impl.h: New. * parse/rust-parse.cc: New. * parse/rust-parse.h: New. Co-authored-by: Philip Herron <philip.herron@embecosm.com> Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com> Signed-off-by: Joel Phillips <simplytheother@gmail.com>
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve.cc')
0 files changed, 0 insertions, 0 deletions