Skip to content
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

Area are with deci prefix fails #26

Open
phlegx opened this issue Jun 4, 2016 · 2 comments
Open

Area are with deci prefix fails #26

phlegx opened this issue Jun 4, 2016 · 2 comments

Comments

@phlegx
Copy link
Contributor

phlegx commented Jun 4, 2016

Hi! I want to search deci are (d as prefix and ar as primary code):

Unitwise(1, 'dar')

but I get this error:

Unitwise::ExpressionError: Could not evaluate 'care'.

Any idea?

@phlegx
Copy link
Contributor Author

phlegx commented Jun 4, 2016

The problem seams to be on the prefixes deka and deci:

- :names: deka
  :symbol: da
  :primary_code: da
  :secondary_code: DA
  :scalar: 1e1
- :names: deci
  :symbol: d
  :primary_code: d
  :secondary_code: D
  :scalar: 1e-1

Unitwise(1, 'dar') the parser finds before da as prefix instead of d.

Unitwise(1, 'deciare') works!

@joshwlewis
Copy link
Owner

@phlegx, thanks for the report. This certainly looks like a bug. dar should be something we can parse. We should be able to parse da as the same unit, but it fails in the same way.

I suspect that you are correct, and it has something to do with that da prefix being consumed by the parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants