Why is this program valid? I was trying to create a syntax error

后端 未结 6 1293
不思量自难忘°
不思量自难忘° 2020-11-28 17:04

I\'m running ActiveState\'s 32 bit ActivePerl 5.14.2 on Windows 7. I wanted to mess around with a Git pre-commit hook to detect programs being checked in with syntax errors.

6条回答
  •  旧时难觅i
    2020-11-28 17:53

    Try Perl 6, it seems to fulfill your expectations more readily:

    ===SORRY!=== Error while compiling synerror.p6
    Negation metaoperator not followed by valid infix
    at synerror.p6:1
    ------> Syntax error!⏏
        expecting any of:
            infix
            infix stopper
    

提交回复
热议问题