-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from savi-lang/update
Update enum declarations for latest Savi version.
- Loading branch information
Showing
4 changed files
with
50 additions
and
43 deletions.
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 |
---|---|---|
@@ -1,25 +1,23 @@ | ||
:enum _Op | ||
:const bit_width U8: 8 | ||
|
||
:fun non from!(byte U8): @from_u64!(byte.u64) | ||
|
||
// We reserve everything below the minimum opcode to match the specified byte. | ||
:fun non min_op U8: 0xF3 | ||
|
||
// This could theoretically be used for any byte, but we only use it for | ||
// bytes from min_op and higher; all lower op codes indicate the byte itself. | ||
:member _OpByte: 0xF3 | ||
:member Byte 0xF3 | ||
|
||
:member _OpMatch: 0xF4 | ||
:member _OpRecursiveMatch: 0xF5 // For lookahead | ||
:member _OpJump: 0xF6 | ||
:member _OpSplit: 0xF7 | ||
:member _OpSplitMany: 0xF8 | ||
:member _OpAnyByte: 0xF9 | ||
:member _OpByteRange: 0xFA | ||
:member _OpSaveStart: 0xFB | ||
:member _OpSaveFinish: 0xFC | ||
:member _OpBackrefCompare: 0xFD | ||
:member _OpInlineZWA: 0xFE | ||
:member _OpRecursiveZWA: 0xFF | ||
:member Match 0xF4 | ||
:member RecursiveMatch 0xF5 // For lookahead | ||
:member Jump 0xF6 | ||
:member Split 0xF7 | ||
:member SplitMany 0xF8 | ||
:member AnyByte 0xF9 | ||
:member ByteRange 0xFA | ||
:member SaveStart 0xFB | ||
:member SaveFinish 0xFC | ||
:member BackrefCompare 0xFD | ||
:member InlineZWA 0xFE | ||
:member RecursiveZWA 0xFF | ||
|
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