Gidsss / UwUIDE

A compiler made to be cute uwu >~<
6 stars 0 forks source link

Feat/getting substring methods #247

Closed am-cid closed 6 months ago

am-cid commented 6 months ago

closes #246


new

etc


test log

sample text file
------------------------------------------
 1 |
 2 | fwunc mainuwu-san() [[
 3 |     a-senpai = "hello"~
 4 |     b-chan~
 5 |     b = a.first("").first(2,2).len()~
 6 |     b = a.last(2,2).len()~
 7 |     b = a.upTo(2,2).len()~
 8 |     b = a.from(2,2).len()~
 9 |     b = a.substr(2,2,2).len()~
10 |
11 | ]]
12 |
------------------------------------------
end of file

Call arg type mismatch:
        __________________________________________
          |
          |     'senpai.first()' called here
        5 |     b = a.first("").first(2,2).len()~
          |           ^^^^^
          |
          |     'senpai.first()' class method expects 1 argument
          |     EXPECTED     ACTUAL     ARG
          |     ✗ chan       senpai     ""
        __________________________________________

Call arg type mismatch:
        __________________________________________
          |
          |     'senpai.first()' called here
        5 |     b = a.first("").first(2,2).len()~
          |                     ^^^^^
          |
          |     'senpai.first()' class method expects 1 argument
          |     EXPECTED     ACTUAL     ARG
          |     ✓ chan       chan       2
          |
          |     1 arg too many
          |     ✗ NONE        ( 2 )      2
        __________________________________________

Call arg type mismatch:
        _______________________________
          |
          |     'senpai.last()' called here
        6 |     b = a.last(2,2).len()~
          |           ^^^^
          |
          |     'senpai.last()' class method expects 1 argument
          |     EXPECTED     ACTUAL     ARG
          |     ✓ chan       chan       2
          |
          |     1 arg too many
          |     ✗ NONE        ( 2 )      2
        _______________________________

Call arg type mismatch:
        _______________________________
          |
          |     'senpai.upTo()' called here
        7 |     b = a.upTo(2,2).len()~
          |           ^^^^
          |
          |     'senpai.upTo()' class method expects 1 argument
          |     EXPECTED     ACTUAL     ARG
          |     ✗ senpai     chan       2
          |
          |     1 arg too many
          |     ✗ NONE        ( 2 )      2
        _______________________________

Call arg type mismatch:
        _______________________________
          |
          |     'senpai.from()' called here
        8 |     b = a.from(2,2).len()~
          |           ^^^^
          |
          |     'senpai.from()' class method expects 1 argument
          |     EXPECTED     ACTUAL     ARG
          |     ✗ senpai     chan       2
          |
          |     1 arg too many
          |     ✗ NONE        ( 2 )      2
        _______________________________

Call arg type mismatch:
        ___________________________________
          |
          |     'senpai.substr()' called here
        9 |     b = a.substr(2,2,2).len()~
          |           ^^^^^^
          |
          |     'senpai.substr()' class method expects 2 arguments
          |     EXPECTED     ACTUAL     ARG
          |     ✓ chan       chan       2
          |     ✓ chan       chan       2
          |
          |     1 arg too many
          |     ✗ NONE        ( 2 )      2
        ___________________________________