Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions cranelift/isle/docs/language-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -495,10 +495,10 @@ operators:

* Wildcards (`_`).
* Integer constants (decimal/hex/binary/octal, positive/negative: `1`, `-1`,
`0x80`, `-0x80`) and boolean constants (`#t`, `#f`). Hex constants can
start with either `0x` or `0X`. Binary constants start with `0b`. Octal
constants start with `0o`. Integers can also be interspersed with `_` as a
separator, for example `1_000` or `0x1234_5678`, for readability.
`0x80`, `-0x80`). Hex constants can start with either `0x` or `0X`.
Binary constants start with `0b`. Octal constants start with `0o`.
Integers can also be interspersed with `_` as a separator, for example
`1_000` or `0x1234_5678`, for readability.
* constants imported from the embedding, of arbitrary type
(`$MyConst`).
* Variable captures and matches (bare identifiers like `x`; an
Expand All @@ -523,7 +523,6 @@ The expression (right-hand side) is made up of the following
expression operators:

* Integer and symbolic constants, as above.
* Boolean constants `#t` and `#f` (following Scheme syntax).
* Variable uses (bare `x` identifier).
* Term constructors (`(term EXPR1 EXPR2 ...)`, where each
subexpression is evaluated first and then the term is constructed).
Expand Down Expand Up @@ -1487,8 +1486,6 @@ newline). The grammar accepted by the parser is as follows:

<expr> ::= <int>
| <const-ident>
| "#t" ;; Scheme-like "true": shorthand for 1
| "#f" ;; Scheme-like "false": shorthand for 0
| <ident>
| "(" "let" "(" <let-binding>* ")" <expr> ")"
| "(" <ident> <expr>* ")"
Expand Down
2 changes: 1 addition & 1 deletion cranelift/isle/isle/isle_examples/pass/test4.isle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
a
(Ext1 x)
(Ext2 x)))
(C #t))
(C 1))

(type Opcode (enum A B C))
(type MachInst (enum D E F))
Expand Down
4 changes: 0 additions & 4 deletions cranelift/isle/isle/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -890,10 +890,6 @@ impl<'a> Parser<'a> {
let ret = self.parse_expr_inner_parens(pos)?;
self.expect_rparen()?;
Ok(ret)
} else if self.eat_sym_str("#t")? {
Ok(Expr::ConstInt { val: 1, pos })
} else if self.eat_sym_str("#f")? {
Ok(Expr::ConstInt { val: 0, pos })
} else if self.is_const() {
let val = self.parse_const()?;
Ok(Expr::ConstPrim { val, pos })
Expand Down