Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Flipez/rocket-lang
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.17.0
Choose a base ref
...
head repository: Flipez/rocket-lang
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.17.1
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Jul 3, 2022

  1. update changelog

    Signed-off-by: Flipez <[email protected]>
    Flipez committed Jul 3, 2022
    1
    Copy the full SHA
    022fe97 View commit details
  2. Foreach improvements (#92)

    * Fix error test
    
    Signed-off-by: Flipez <[email protected]>
    
    * Add more specific error
    
    Signed-off-by: Flipez <[email protected]>
    Flipez authored Jul 3, 2022
    1
    Copy the full SHA
    4d453f4 View commit details
Showing with 15 additions and 2 deletions.
  1. +8 −0 CHANGELOG.md
  2. +2 −2 examples/misc/foreach-error.rl
  3. +5 −0 parser/foreach.go
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [v0.17.0](https://github.com/flipez/rocket-lang/tree/v0.17.0) (2022-07-03)

[Full Changelog](https://github.com/flipez/rocket-lang/compare/v0.16.0...v0.17.0)

**Merged pull requests:**

- Add nil and replace null with it [\#91](https://github.com/Flipez/rocket-lang/pull/91) ([Flipez](https://github.com/Flipez))

## [v0.16.0](https://github.com/flipez/rocket-lang/tree/v0.16.0) (2022-07-02)

[Full Changelog](https://github.com/flipez/rocket-lang/compare/v0.15.1...v0.16.0)
4 changes: 2 additions & 2 deletions examples/misc/foreach-error.rl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
foreach i, v in [1,2,3] {
foreach i, v in [1,2,3]
v.reverse()
puts(v)
}
end
5 changes: 5 additions & 0 deletions parser/foreach.go
Original file line number Diff line number Diff line change
@@ -33,6 +33,11 @@ func (p *Parser) parseForEach() ast.Expression {
}

if !p.expectPeek(token.IN) {
p.errors = append(p.errors, fmt.Sprintf(
"%d:%d: expected `in` after foreach arguments, got %v",
p.peekToken.LineNumber,
p.peekToken.LinePosition,
p.peekToken))
return nil
}
p.nextToken()