Skip to content

Commit

Permalink
Refactoring: No need for <mark-expr>.
Browse files Browse the repository at this point in the history
This also removes struct ast_pos, with no remaining uses.
  • Loading branch information
katef committed May 29, 2024
1 parent 51c42fa commit f0da88d
Show file tree
Hide file tree
Showing 20 changed files with 1,570 additions and 1,757 deletions.
12 changes: 0 additions & 12 deletions src/libre/ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,6 @@
#ifndef RE_AST_H
#define RE_AST_H

/*
* This is a duplicate of struct lx_pos, but since we're linking to
* code with several distinct lexers, there isn't a clear lexer.h
* to include here. The parser sees both definitions, and will
* build a `struct ast_pos` in the appropriate places.
*/
struct ast_pos {
unsigned byte;
unsigned line;
unsigned col;
};

enum ast_expr_type {
/* Reserve one value (0) indicating a freed expression. This value is
* intentionally unnamed: code that switches on n->type should be able
Expand Down
98 changes: 45 additions & 53 deletions src/libre/dialect/glob/parser.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/libre/dialect/glob/parser.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/libre/dialect/glob/parser.sid
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@
!<mark-group>: (:pos, :pos) -> ();
!<mark-range>: (:pos, :pos) -> ();
!<mark-count>: (:pos, :pos) -> ();
!<mark-expr>: (:ast_expr, :pos, :pos) -> ();

<class-any>: () -> (:ast_class_id);
!<class-bsr>: () -> (:ast_class_id);
Expand Down
Loading

0 comments on commit f0da88d

Please sign in to comment.