Skip to content

Commit

Permalink
support rivet -v and rivet --version
Browse files Browse the repository at this point in the history
  • Loading branch information
StunxFS committed Mar 29, 2024
1 parent 440c8bc commit 6fb4698
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/src/rivet.ri
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func main() {
},
"new", "init" -> tools.cmd_new(process.args[2:], cmd == "init")!,
"fmt" -> tools.cmd_fmt(process.args[2:])!,
"version" -> {
"-v", "--version", "version" -> {
console.ewriteln(utils.full_version());
process.exit(0);
},
Expand Down
4 changes: 3 additions & 1 deletion lib/rivet/src/parser/mod.ri
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ pub struct Parser {
mut inside_match_header: bool;
mut inside_block: bool;

pub func parse_module(^mut self, mod_sym: ^mut ast.Module, files: []string) -> []^mut ast.SourceFile {
pub func parse_module(
^mut self, mod_sym: ^mut ast.Module, files: []string
) -> []^mut ast.SourceFile {
self.scope = mod_sym.scope;
self.mod_sym = mod_sym;
return self.parse_module_files(files);
Expand Down

0 comments on commit 6fb4698

Please sign in to comment.