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
2 changes: 0 additions & 2 deletions .github/workflows/stable_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,3 @@ jobs:
- name: moon test
run: |
moon test --target all
moon test --target native

2 changes: 1 addition & 1 deletion attribute/parser.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub suberror ParseError {
} derive(Show)

///|
typealias Error as YYObj
type YYObj = Error

///|
priv suberror YYObj_Void
Expand Down
42 changes: 21 additions & 21 deletions attribute/parser.mbt.map.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,127 +3,127 @@
{
"source": "parser.mbty",
"original_offset": 2812,
"generated_offset": 2524,
"generated_offset": 2506,
"length": 15
},
{
"source": "parser.mbty",
"original_offset": 2845,
"generated_offset": 2768,
"generated_offset": 2750,
"length": 1
},
{
"source": "parser.mbty",
"original_offset": 2848,
"generated_offset": 2777,
"generated_offset": 2759,
"length": 1
},
{
"source": "parser.mbty",
"original_offset": 3570,
"generated_offset": 2987,
"generated_offset": 2969,
"length": 15
},
{
"source": "parser.mbty",
"original_offset": 3621,
"generated_offset": 3249,
"generated_offset": 3231,
"length": 1
},
{
"source": "parser.mbty",
"original_offset": 3624,
"generated_offset": 3258,
"generated_offset": 3240,
"length": 1
},
{
"source": "parser.mbty",
"original_offset": 2898,
"generated_offset": 3544,
"generated_offset": 3526,
"length": 15
},
{
"source": "parser.mbty",
"original_offset": 2915,
"generated_offset": 3567,
"generated_offset": 3549,
"length": 2
},
{
"source": "parser.mbty",
"original_offset": 3274,
"generated_offset": 3941,
"generated_offset": 3923,
"length": 40
},
{
"source": "parser.mbty",
"original_offset": 3103,
"generated_offset": 4300,
"generated_offset": 4282,
"length": 33
},
{
"source": "parser.mbty",
"original_offset": 3188,
"generated_offset": 4658,
"generated_offset": 4640,
"length": 34
},
{
"source": "parser.mbty",
"original_offset": 3024,
"generated_offset": 4964,
"generated_offset": 4946,
"length": 27
},
{
"source": "parser.mbty",
"original_offset": 2947,
"generated_offset": 5226,
"generated_offset": 5208,
"length": 6
},
{
"source": "parser.mbty",
"original_offset": 2955,
"generated_offset": 5240,
"generated_offset": 5222,
"length": 2
},
{
"source": "parser.mbty",
"original_offset": 3366,
"generated_offset": 5511,
"generated_offset": 5493,
"length": 8
},
{
"source": "parser.mbty",
"original_offset": 3376,
"generated_offset": 5527,
"generated_offset": 5509,
"length": 2
},
{
"source": "parser.mbty",
"original_offset": 3430,
"generated_offset": 5746,
"generated_offset": 5728,
"length": 12
},
{
"source": "parser.mbty",
"original_offset": 3494,
"generated_offset": 5976,
"generated_offset": 5958,
"length": 13
},
{
"source": "parser.mbty",
"original_offset": 3747,
"generated_offset": 6283,
"generated_offset": 6265,
"length": 11
},
{
"source": "parser.mbty",
"original_offset": 3678,
"generated_offset": 6536,
"generated_offset": 6518,
"length": 19
},
{
"source": "parser.mbty",
"original_offset": 3699,
"generated_offset": 6563,
"generated_offset": 6545,
"length": 3
}
]
Expand Down
18 changes: 9 additions & 9 deletions attribute/pkg.generated.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,45 @@ import(
)

// Values
fn payloads(Array[(@tokens.Token, @basic.Position, @basic.Position)], initial_pos? : @basic.Position) -> @list.List[Prop] raise ParseError
pub fn payloads(Array[(@tokens.Token, @basic.Position, @basic.Position)], initial_pos? : @basic.Position) -> @list.List[Prop] raise ParseError

// Errors
pub suberror ParseError {
UnexpectedToken(@tokens.Token, (@basic.Position, @basic.Position), Array[@tokens.TokenKind])
UnexpectedEndOfInput(@basic.Position, Array[@tokens.TokenKind])
}
impl Show for ParseError
pub impl Show for ParseError

// Types and methods
pub(all) struct Attribute {
loc : @basic.Location
raw : String
parsed : Expr?
}
fn Attribute::name(Self) -> String?
fn Attribute::new(loc~ : @basic.Location, (String, String?, String)) -> Self
impl Show for Attribute
impl ToJson for Attribute
pub fn Attribute::name(Self) -> String?
pub fn Attribute::new(loc~ : @basic.Location, (String, String?, String)) -> Self
pub impl Show for Attribute
pub impl ToJson for Attribute

pub(all) enum Expr {
Ident(Id)
String(String)
Apply(Id, @list.List[Prop])
Bool(Bool)
}
impl Show for Expr
pub impl Show for Expr

pub(all) struct Id {
qual : String?
name : String
}
impl Show for Id
pub impl Show for Id

pub(all) enum Prop {
Labeled(String, Expr)
Expr(Expr)
}
impl Show for Prop
pub impl Show for Prop

// Type aliases

Expand Down
38 changes: 19 additions & 19 deletions basic/pkg.generated.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
package "moonbitlang/parser/basic"

// Values
let builtin_package : String
pub let builtin_package : String

let current_package : Ref[String]
pub let current_package : Ref[String]

let show_loc : Ref[LocStyle]
pub let show_loc : Ref[LocStyle]

// Errors

Expand All @@ -21,34 +21,34 @@ pub(all) struct Location {
start : Position
end : Position
}
fn Location::merge(Self, Self) -> Self
fn Location::trim_first_char(Self) -> Self
fn Location::trim_last_char(Self) -> Self
impl Compare for Location
impl Eq for Location
impl Hash for Location
impl Show for Location
impl ToJson for Location
pub fn Location::merge(Self, Self) -> Self
pub fn Location::trim_first_char(Self) -> Self
pub fn Location::trim_last_char(Self) -> Self
pub impl Compare for Location
pub impl Eq for Location
pub impl Hash for Location
pub impl Show for Location
pub impl ToJson for Location

pub(all) struct Position {
fname : String
lnum : Int
bol : Int
cnum : Int
}
fn Position::column(Self) -> Int
impl Compare for Position
impl Eq for Position
impl Hash for Position
impl Show for Position
impl ToJson for Position
pub fn Position::column(Self) -> Int
pub impl Compare for Position
pub impl Eq for Position
pub impl Hash for Position
pub impl Show for Position
pub impl ToJson for Position

pub(all) struct Report {
loc : Location
msg : String
}
impl Show for Report
impl ToJson for Report
pub impl Show for Report
pub impl ToJson for Report

// Type aliases

Expand Down
2 changes: 1 addition & 1 deletion handrolled_parser/pkg.generated.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import(
)

// Values
fn parse(Array[(@tokens.Token, @basic.Position, @basic.Position)]) -> (@list.List[@syntax.Impl], Array[@basic.Report])
pub fn parse(Array[(@tokens.Token, @basic.Position, @basic.Position)]) -> (@list.List[@syntax.Impl], Array[@basic.Report])

// Errors

Expand Down
2 changes: 1 addition & 1 deletion lexer/lex.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub fn tokens_from_string(
let last_idx = docstrings.length() - 1
docstrings[last_idx] = docstrings[last_idx].rev()
}
docstrings.rev_inplace()
docstrings.rev_in_place()
LexResult::{ tokens: env.tokens, errors: env.errors, docstrings }
}

Expand Down
6 changes: 3 additions & 3 deletions lexer/pkg.generated.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import(
)

// Values
fn tokens_from_string(name? : String, start_pos? : @basic.Position, is_interpolation? : Bool, comment~ : Bool, String) -> LexResult
pub fn tokens_from_string(name? : String, start_pos? : @basic.Position, is_interpolation? : Bool, comment~ : Bool, String) -> LexResult

fn tokens_from_string_with_utf16_location(name? : String, start_pos? : @basic.Position, is_interpolation? : Bool, comment~ : Bool, String) -> LexResult
pub fn tokens_from_string_with_utf16_location(name? : String, start_pos? : @basic.Position, is_interpolation? : Bool, comment~ : Bool, String) -> LexResult

// Errors

Expand All @@ -33,7 +33,7 @@ pub enum LexicalError {
InvalidByteLiteral(String)
Reserved_keyword(String)
}
impl Show for LexicalError
pub impl Show for LexicalError

// Type aliases

Expand Down
Loading