Go to file
KtorZ 78d34f7f76 Fix parsing of negative int patterns and constants
This was trickier than expected as the expression parser, and in particular the bin-op parser will interpret negative patterns as a continuation of a binary operation and eventually choke on the next right-arrow symbol. This is due to how we actually completely erase newlines once we're done with the lexer. The newline separating when clause is actually semantically important. In principle, we could only parse an expression until the next newline.

  Ideally, we would keep that newline in the list of token but it's difficult to figure out which newline to keep between two right arrows since a clause guard can be written over multiple lines. Though, since we know that this is only truly a problem for negative integers, we can use the same trick as for tuples and define a new 'NewLineMinus' token. That token CANNOT be part of a binop expression. That means it's impossible to write a binary operation with a minus over multiple lines, or more specifically, with the '-' symbol on a newline. This sounds like a fair limitation. What we get in exchange is less ambiguity when parsing patterns following expressions in when clause cases.

  Another more cumbersome option could be to preserve the first newline encountered after a 'right-arrow' symbol and before any parenthesis or curly brace is found (which would otherwise signal the beginning of a new block). That requires to traverse, at least partially, the list of tokens twice. This feels unnecessary for now and until we do face a similar issue with a binary operator.
2023-07-06 16:10:46 -04:00
.github chore: use magic-nix-cache instead of cachix 2023-06-28 11:06:33 -03:00
aikup Bump versions to 1.0.0-alpha, update CHANGELOG. 2023-04-13 17:35:21 +02:00
crates Fix parsing of negative int patterns and constants 2023-07-06 16:10:46 -04:00
examples Fixes evaluation of large positive bigint in the UPLC machine 2023-07-05 18:52:14 +02:00
.editorconfig rename examples/tests/{a,b,c,d,e,f} into examples/acceptance_tests/00{1,2,3,4,5,6} 2022-12-14 09:45:24 +01:00
.gitattributes Add support for Nix flakes. 2023-02-07 13:16:17 +01:00
.gitignore chore: re-add nix stuff from @waalge 2023-06-07 17:16:56 -04:00
CHANGELOG.md Update CHANGELOG.md 2023-07-05 18:58:21 +02:00
CONTRIBUTING.md Update CONTRIBUTING.md 2023-07-04 08:33:15 -04:00
Cargo.lock feat: add insta as dependency 2023-07-04 17:19:28 -04:00
Cargo.nix [create-pull-request] automated change 2023-07-04 17:19:06 -04:00
Cargo.toml feat: finish splitting up parsers 2023-07-04 17:19:28 -04:00
LICENSE chore: adjustment cargo.toml 2023-05-23 10:40:26 -04:00
README.md chore: adjustment cargo.toml 2023-05-23 10:40:26 -04:00
flake.lock bump flake and change inputs 2023-04-30 20:32:24 -04:00
flake.nix chore: re-add nix stuff from @waalge 2023-06-07 17:16:56 -04:00

README.md

Aiken Aiken

A modern smart contract platform for Cardano

Licence Crates.io Tests


Installation

How to use

For more information please see the user manual.

Contributing

Want to contribute? See CONTRIBUTING.md to know how.


Note

The name comes from Howard Aiken, an American physicist and a pioneer in computing.