Skip to content

Commit

Permalink
string interpol: \() to \{} (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
notch1p authored Aug 6, 2024
1 parent 98f01b7 commit 8f91865
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 4 deletions.
2 changes: 2 additions & 0 deletions crypto/crypto.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ fn uints_to_hex_string(Array[UInt]) -> String

// Types and methods

// Type aliases

// Traits

// Extension Methods
Expand Down
2 changes: 2 additions & 0 deletions json5/json5.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ impl Position {
to_string(Self) -> String
}

// Type aliases

// Traits

// Extension Methods
Expand Down
2 changes: 1 addition & 1 deletion json5/parse_test.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn test_parse(input : String, ~loc : SourceLoc = _) -> @json.JsonValue!Error {
let v = @json5.parse?(input)
match v {
Ok(v) => v
Err(err) => fail!("Parse failed, \(loc), \(err)")
Err(err) => fail!("Parse failed, \{loc}, \{err}")
}
}

Expand Down
6 changes: 3 additions & 3 deletions json5/types.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ fn parse_error[X](data : ParseErrorData) -> X!ParseError {
pub fn ParseError::to_string(self : ParseError) -> String {
match self {
ParseError(InvalidChar({ line, column }, c)) =>
"Invalid character \(c) at line \(line), column \(column)"
"Invalid character \{c} at line \{line}, column \{column}"
ParseError(InvalidEof) => "Unexpected end of file"
ParseError(InvalidNumber({ line, column }, s)) =>
"Invalid number \(s) at line \(line), column \(column)"
"Invalid number \{s} at line \{line}, column \{column}"
ParseError(InvalidIdentEscape({ line, column })) =>
"Invalid escape sequence in identifier at line \(line), column \(column)"
"Invalid escape sequence in identifier at line \{line}, column \{column}"
}
}

Expand Down
2 changes: 2 additions & 0 deletions num/num.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ package moonbitlang/x/num

// Types and methods

// Type aliases

// Traits
pub trait Num {
from_int(Int) -> Self
Expand Down
2 changes: 2 additions & 0 deletions stack/stack.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ impl Stack {
to_string[T : Show](Self[T]) -> String
}

// Type aliases

// Traits

// Extension Methods
Expand Down
2 changes: 2 additions & 0 deletions time/time.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ impl ZonedDateTime {
zone(Self) -> Zone
}

// Type aliases

// Traits

// Extension Methods
Expand Down
2 changes: 2 additions & 0 deletions uuid/uuid.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ impl Version {
to_string(Self) -> String
}

// Type aliases

// Traits

// Extension Methods
Expand Down

0 comments on commit 8f91865

Please sign in to comment.