mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Constrain string interpolation
This commit is contained in:
parent
5080a7e24b
commit
274e7e786d
11 changed files with 150 additions and 180 deletions
|
@ -151,10 +151,9 @@ impl Variable {
|
|||
pub const EMPTY_TAG_UNION: Variable = Variable(2);
|
||||
// Builtins
|
||||
const BOOL_ENUM: Variable = Variable(3);
|
||||
pub const BOOL: Variable = Variable(4);
|
||||
pub const LIST_GET: Variable = Variable(5);
|
||||
pub const BOOL: Variable = Variable(4); // Used in `if` conditions
|
||||
|
||||
pub const NUM_RESERVED_VARS: usize = 6;
|
||||
pub const NUM_RESERVED_VARS: usize = 5;
|
||||
|
||||
const FIRST_USER_SPACE_VAR: Variable = Variable(Self::NUM_RESERVED_VARS as u32);
|
||||
|
||||
|
|
|
@ -904,7 +904,7 @@ pub enum Reason {
|
|||
FloatLiteral,
|
||||
IntLiteral,
|
||||
NumLiteral,
|
||||
InterpolatedStringVar,
|
||||
StrInterpolation,
|
||||
WhenBranch {
|
||||
index: Index,
|
||||
},
|
||||
|
@ -930,6 +930,7 @@ pub enum Category {
|
|||
TagApply(TagName),
|
||||
Lambda,
|
||||
Uniqueness,
|
||||
StrInterpolation,
|
||||
|
||||
// storing variables in the ast
|
||||
Storage,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue