aiken/crates/uplc/src
KtorZ 375499930a Add UPLC support for 'ProtoList' & 'ProtoPair' constants
Supersedes #35.

  The syntax for these elements isn't "set in stone"; in the sense that it is unspecified in [input-output-hk/plutus](https://github.com/input-output-hk/plutus). There's no visible plan from IOG to extend the Haskell parser to support this syntax, though there are samples of imagined syntax in the code. Thus, we can lead the way and simply choose a suitable syntax and let the Haskell implementation align to it later.

  This syntax is thus inspired from input-output-hk/plutus' samples, with only a small change: we use `<` and `>` for encapsulating type declaration instead of `(`, `)`. There are already enough parentheses in the UPLC syntax, adding more reduces visibility.

  Doing this, I've also added a lot more test cases for the UPLC parser. There could be more, but this is a good start.

  Here are some example programs (taken from test cases) utilizing this syntax:

  ```
  (program 0.0.0 (con list<bytestring> [#00, #01]))
  ```

  ```
  (program 0.0.0
      (con pair
        <integer, integer>
        [14, 42]
      )
  )
  ```

  ```
  (program 0.0.0
      (con pair<string, list<integer>> ["foo", [14, 42]])
  )
  ```

  _(Note that this was mainly done as an exercise to get more familiar with Rust and parts of Aiken.)_
2022-12-03 10:16:16 -05:00
..
debruijn fix issue with same names causing 0 index debruijn for var 2022-06-26 21:38:27 -04:00
machine removed unnecessary return statement 2022-10-17 08:35:45 -04:00
parser chore: add default for Interner 2022-11-08 22:21:07 -05:00
program_builder added i128 integer support 2022-10-17 08:35:45 -04:00
tx Fixed more clippy issues 2022-11-04 18:21:22 +01:00
ast.rs added i128 integer support 2022-10-17 08:35:45 -04:00
builtins.rs move `to_string()` outside of the match 2022-11-28 17:30:45 -05:00
debruijn.rs chore: deal with clippy warnings 2022-11-10 01:27:18 -05:00
flat.rs Create unknown constructor error for decode 2022-10-23 17:54:21 -04:00
lib.rs Expose Pallas stuff, bump version, update changelog 2022-10-27 20:40:37 -07:00
machine.rs added i128 integer support 2022-10-17 08:35:45 -04:00
parser.rs Add UPLC support for 'ProtoList' & 'ProtoPair' constants 2022-12-03 10:16:16 -05:00
pretty.rs Add UPLC support for 'ProtoList' & 'ProtoPair' constants 2022-12-03 10:16:16 -05:00
program_builder.rs Expand builder (#20) 2022-07-01 20:50:58 -07:00
tx.rs Expose Pallas stuff, bump version, update changelog 2022-10-27 20:40:37 -07:00