diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-05-10 14:25:09 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-02 14:23:21 +0000 |
| commit | d36259f60b3e6f6077710905d5f7fcfd9f1710fc (patch) | |
| tree | ec6975f00af35b0faf83f8c20b7ad0eab6e7ae7f /alv/base | |
| parent | add and test Type:eq(a,b) (diff) | |
| download | alive-d36259f60b3e6f6077710905d5f7fcfd9f1710fc.tar.gz alive-d36259f60b3e6f6077710905d5f7fcfd9f1710fc.zip | |
make <num! 4> == <num= 4>
Diffstat (limited to 'alv/base')
| -rw-r--r-- | alv/base/match.moon | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/alv/base/match.moon b/alv/base/match.moon index 926c970..f19c4d8 100644 --- a/alv/base/match.moon +++ b/alv/base/match.moon @@ -50,11 +50,13 @@ import Primitive from require 'alv.type' local Repeat, Sequence, Choice, Optional class Pattern + fulltype = (res) -> (tostring res.type) .. res.metatype + match: (seq) => @reset! num, cap = @capture seq, 1 if num != #seq - args = table.concat [arg.result\fulltype! for arg in *seq], ' ' + args = table.concat [fulltype arg.result for arg in *seq], ' ' msg = "couldn't match arguments (#{args}) against pattern #{@}" error Error 'argument', msg cap |
