Skip to content

Commit

Permalink
Add CfxLua to Workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mdxwzl committed Feb 9, 2025
1 parent b66a9aa commit 05ac2a4
Show file tree
Hide file tree
Showing 5 changed files with 657 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@ jobs:
run: |
cd full-moon
cargo test --features luajit
- name: Test (CfxLua feature)
run: |
cd full-moon
cargo test --features cfxlua
- name: Test (all features)
run: |
cd full-moon
cargo test --features luau,lua52,lua53,lua54,luajit
cargo test --features luau,lua52,lua53,lua54,luajit,cfxlua
- name: Test (no default features)
run: |
cd full-moon
Expand Down
2 changes: 1 addition & 1 deletion full-moon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ keywords = ["lua", "parser", "lua51", "lua52", "luau", "cfxlua"]
edition = "2021"

[package.metadata.docs.rs]
# Build Locally: RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --features luau,lua52,lua53,lua54,luajit --no-deps --open
# Build Locally: RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --features luau,lua52,lua53,lua54,luajit,cfxlua --no-deps --open
features = ["luau", "lua52", "lua53", "lua54", "luajit", "cfxlua"]
rustdoc-args = ["--cfg", "docsrs"]

Expand Down
5 changes: 3 additions & 2 deletions full-moon/src/ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ use lua52::*;
#[cfg(feature = "lua54")]
use lua54::*;

#[cfg(feature = "luau")]
use luau::*;

#[cfg(any(feature = "luau", feature = "cfxlua"))]
mod compound;
#[cfg(any(feature = "luau", feature = "cfxlua"))]
pub use compound::*;

#[cfg(feature = "luau")]
use luau::*;
pub use parser_structs::AstResult;
use punctuated::{Pair, Punctuated};
use span::ContainedSpan;
Expand Down
4 changes: 2 additions & 2 deletions full-moon/src/ast/parsers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ fn parse_compound_assignment(state: &mut ParserState, var: Var) -> ParserResult<
return ParserResult::LexerMoved;
};

return ParserResult::Value(StmtVariant::Stmt(ast::Stmt::CompoundAssignment(
ParserResult::Value(StmtVariant::Stmt(ast::Stmt::CompoundAssignment(
ast::CompoundAssignment {
lhs: var,
compound_operator: ast::CompoundOp::from_token(compound_operator),
rhs: expr,
},
)));
)))
}


Expand Down
Loading

0 comments on commit 05ac2a4

Please sign in to comment.