-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Implement an eqWAlizer AST transformer in ELP, based on the AST visitor already implemented. Add `preprocess` module implementing (for now) the default implementation of the transformer, which is called on every AST/stub going through ELP. Reviewed By: RobinMorisset Differential Revision: D60584098 fbshipit-source-id: 52f1a705e2c3616cc08921898276dc345dec9986
- Loading branch information
1 parent
ed89ea0
commit 16eef67
Showing
4 changed files
with
797 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under both the MIT license found in the | ||
* LICENSE-MIT file in the root directory of this source tree and the Apache | ||
* License, Version 2.0 found in the LICENSE-APACHE file in the root directory | ||
* of this source tree. | ||
*/ | ||
|
||
use elp_types_db::eqwalizer::transformer::Transformer; | ||
use elp_types_db::eqwalizer::AST; | ||
|
||
struct Preprocessor {} | ||
|
||
impl Transformer<()> for Preprocessor {} | ||
|
||
pub(crate) fn preprocess(ast: AST) -> AST { | ||
let mut preprocessor = Preprocessor {}; | ||
preprocessor.transform_ast(ast).unwrap() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.