New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nicer error message on name duplicates #255

Merged
merged 1 commit into from Mar 27, 2018

Conversation

Projects
None yet
3 participants
@dahlia
Member

dahlia commented Mar 26, 2018

Continued from #254. Now give nicer error message on name duplicates. Offset line/column number became accurate.

Where the following Nirum code is given:


union bar = foo
          | bar
          | baz;

Although the compiler had given the following error message (which refers to inaccurate offset line/column number):

examples/a.nrm:5:1:
the facial type name `bar` is duplicated


^

It's now like the following:

examples/a.nrm:3:13:
the tag name `bar` is duplicated

          | bar
            ^

See also the added "handling name duplications" test case.

@dahlia dahlia self-assigned this Mar 26, 2018

@dahlia dahlia requested a review from kanghyojun Mar 26, 2018

@checkmate-bot

This comment has been minimized.

checkmate-bot commented Mar 26, 2018

Checklist 🤔

src/Nirum/Parser.hs

  • If a new reserved keyword is introduced, it has to be also added to reservedKeywords set in the Nirum.Constructs.Identifier module.
@codecov

This comment has been minimized.

codecov bot commented Mar 26, 2018

Codecov Report

Merging #255 into master will increase coverage by 0.64%.
The diff coverage is 94.02%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #255      +/-   ##
==========================================
+ Coverage   73.13%   73.77%   +0.64%     
==========================================
  Files          33       33              
  Lines        2356     2391      +35     
  Branches      130      124       -6     
==========================================
+ Hits         1723     1764      +41     
  Misses        503      503              
+ Partials      130      124       -6
Impacted Files Coverage Δ
src/Nirum/Parser.hs 86.86% <94.02%> (+2.42%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4529e07...8fd42c8. Read the comment docs.

@dahlia dahlia merged commit 8fd42c8 into nirum-lang:master Mar 27, 2018

4 checks passed

codecov/patch 94.02% of diff hit (target 73.13%)
Details
codecov/project 73.77% (+0.64%) compared to fae1791
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

dahlia added a commit that referenced this pull request Mar 27, 2018

Merge pull request #255 from dahlia/nicer-error-on-name-dups
Nicer error message on name duplicates

@dahlia dahlia added this to the Version 0.4.0 milestone May 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment