Diff of the two buildlogs: -- --- b1/build.log 2025-11-26 01:32:45.467734174 +0000 +++ b2/build.log 2025-11-26 01:51:01.752908140 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Tue Nov 25 12:05:35 -12 2025 -I: pbuilder-time-stamp: 1764115535 +I: Current time: Tue Dec 29 21:55:46 +14 2026 +I: pbuilder-time-stamp: 1798530946 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/unstable-reproducible-base.tgz] I: copying local configuration @@ -26,53 +26,85 @@ dpkg-source: info: applying update-packaged-javascript-links.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/2305333/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/1175125/tmp/hooks/D01_modify_environment starting +debug: Running on ionos5-amd64. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 Dec 29 07:56 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/1175125/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/1175125/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build/reproducible-path' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='amd64' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=40 ' - DISTRIBUTION='unstable' - HOME='/root' - HOST_ARCH='amd64' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="3" [2]="3" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu") + BASH_VERSION='5.3.3(1)-release' + BUILDDIR=/build/reproducible-path + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=amd64 + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=42 nocheck' + DIRSTACK=() + DISTRIBUTION=unstable + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=x86_64 + HOST_ARCH=amd64 IFS=' ' - INVOCATION_ID='de00736b48ff4e77a9b9e1736d535272' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='2305333' - PS1='# ' - PS2='> ' + INVOCATION_ID=f8bf9a5e72ab41d59be05b2c9878b622 + LANG=C + LANGUAGE=et_EE:et + LC_ALL=C + MACHTYPE=x86_64-pc-linux-gnu + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnu + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=1175125 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.eipOsuUA/pbuilderrc_48H0 --distribution unstable --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.eipOsuUA/b1 --logfile b1/build.log crystal_1.18.2+dfsg-1.dsc' - SUDO_GID='111' - SUDO_HOME='/var/lib/jenkins' - SUDO_UID='106' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://46.16.76.132:3128' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.eipOsuUA/pbuilderrc_aYZ0 --distribution unstable --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.eipOsuUA/b2 --logfile b2/build.log crystal_1.18.2+dfsg-1.dsc' + SUDO_GID=110 + SUDO_HOME=/var/lib/jenkins + SUDO_UID=105 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://213.165.73.152:3128 I: uname -a - Linux ionos11-amd64 6.12.57+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.57-1 (2025-11-05) x86_64 GNU/Linux + Linux i-capture-the-hostname 6.12.57+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.57-1 (2025-11-05) x86_64 GNU/Linux I: ls -l /bin - lrwxrwxrwx 1 root root 7 Aug 10 12:30 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/2305333/tmp/hooks/D02_print_environment finished + lrwxrwxrwx 1 root root 7 Aug 10 2025 /bin -> usr/bin +I: user script /srv/workspace/pbuilder/1175125/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -256,7 +288,7 @@ Get: 114 http://deb.debian.org/debian unstable/main amd64 python3-yaml amd64 6.0.2-2 [137 kB] Get: 115 http://deb.debian.org/debian unstable/main amd64 llvm-19-tools amd64 1:19.1.7-18 [505 kB] Get: 116 http://deb.debian.org/debian unstable/main amd64 llvm-19-dev amd64 1:19.1.7-18 [42.8 MB] -Fetched 162 MB in 5s (29.8 MB/s) +Fetched 162 MB in 13s (12.6 MB/s) Preconfiguring packages ... Selecting previously unselected package libexpat1:amd64. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19866 files and directories currently installed.) @@ -642,8 +674,8 @@ Setting up tzdata (2025b-5) ... Current default time zone: 'Etc/UTC' -Local time is now: Wed Nov 26 00:07:08 UTC 2025. -Universal Time is now: Wed Nov 26 00:07:08 UTC 2025. +Local time is now: Tue Dec 29 07:57:20 UTC 2026. +Universal Time is now: Tue Dec 29 07:57:20 UTC 2026. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up liberror-perl (0.17030-1) ... @@ -747,7 +779,11 @@ Building tag database... -> Finished parsing the build-deps I: Building the package -I: Running cd /build/reproducible-path/crystal-1.18.2+dfsg/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../crystal_1.18.2+dfsg-1_source.changes +I: user script /srv/workspace/pbuilder/1175125/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for unstable +I: user script /srv/workspace/pbuilder/1175125/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/reproducible-path/crystal-1.18.2+dfsg/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../crystal_1.18.2+dfsg-1_source.changes dpkg-buildpackage: info: source package crystal dpkg-buildpackage: info: source version 1.18.2+dfsg-1 dpkg-buildpackage: info: source distribution unstable @@ -757,7 +793,7 @@ debian/rules clean dh clean dh_auto_clean - make -j40 clean + make -j42 clean make[1]: Entering directory '/build/reproducible-path/crystal-1.18.2+dfsg' rm -rf .build rm -rf ./docs @@ -777,34542 +813,19 @@ dh_auto_configure debian/rules override_dh_auto_build make[1]: Entering directory '/build/reproducible-path/crystal-1.18.2+dfsg' -dh_auto_build -- release=1 verbose=1 progress=1 threads=40 CRYSTAL_CONFIG_PATH="lib:/usr/lib/crystal/lib" CRYSTAL_CACHE_DIR="/tmp/crystal" interpreter=1 - make -j40 INSTALL="install --strip-program=true" release=1 verbose=1 progress=1 threads=40 CRYSTAL_CONFIG_PATH=lib:/usr/lib/crystal/lib CRYSTAL_CACHE_DIR=/tmp/crystal interpreter=1 +dh_auto_build -- release=1 verbose=1 progress=1 threads=42 CRYSTAL_CONFIG_PATH="lib:/usr/lib/crystal/lib" CRYSTAL_CACHE_DIR="/tmp/crystal" interpreter=1 + make -j42 INSTALL="install --strip-program=true" release=1 verbose=1 progress=1 threads=42 CRYSTAL_CONFIG_PATH=lib:/usr/lib/crystal/lib CRYSTAL_CACHE_DIR=/tmp/crystal interpreter=1 make[2]: Entering directory '/build/reproducible-path/crystal-1.18.2+dfsg' Using /usr/bin/llvm-config-19 [version=19.1.7] -CRYSTAL_CONFIG_BUILD_COMMIT="" CRYSTAL_CONFIG_PATH=lib:/usr/lib/crystal/lib SOURCE_DATE_EPOCH="1764087593" CRYSTAL_CONFIG_LIBRARY_PATH='$ORIGIN/../lib/crystal' ./bin/crystal build -D strict_multi_assign -D preview_overload_order --release --progress --threads 40 --link-flags="-Wl,-z,relro" -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib -D use_pcre2 +CRYSTAL_CONFIG_BUILD_COMMIT="" CRYSTAL_CONFIG_PATH=lib:/usr/lib/crystal/lib SOURCE_DATE_EPOCH="1764087593" CRYSTAL_CONFIG_LIBRARY_PATH='$ORIGIN/../lib/crystal' ./bin/crystal build -D strict_multi_assign -D preview_overload_order --release --progress --threads 42 --link-flags="-Wl,-z,relro" -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib -D use_pcre2 [1/13] Parse [1/13] Parse [2/13] Semantic (top level) [2/13] Semantic (top level) [3/13] Semantic (new) [3/13] Semantic (new) [4/13] Semantic (type declarations) [4/13] Semantic (type declarations) [5/13] Semantic (abstract def check) [5/13] Semantic (abstract def check) [6/13] Semantic (restrictions augmenter) [6/13] Semantic (restrictions augmenter) [7/13] Semantic (ivars initializers) [7/13] Semantic (ivars initializers) [8/13] Semantic (cvars initializers) [8/13] Semantic (cvars initializers) [9/13] Semantic (main) [9/13] Semantic (main) [10/13] Semantic (cleanup) [10/13] Semantic (cleanup) [11/13] Semantic (recursive struct check) [11/13] Semantic (recursive struct check) [12/13] Codegen (crystal) [12/13] Codegen (crystal) [13/13] Codegen (bc+obj) [13/13] [0/1] Codegen (bc+obj) [13/13] [1/1] Codegen (bc+obj) [13/13] [1/1] Codegen (bc+obj) [14/13] Codegen (linking) [14/13] Codegen (linking) make[2]: Leaving directory '/build/reproducible-path/crystal-1.18.2+dfsg' make[1]: Leaving directory '/build/reproducible-path/crystal-1.18.2+dfsg' - debian/rules override_dh_auto_test -make[1]: Entering directory '/build/reproducible-path/crystal-1.18.2+dfsg' -make release=1 verbose=1 progress=1 threads=40 CRYSTAL_CONFIG_PATH="lib:/usr/lib/crystal/lib" CRYSTAL_CACHE_DIR="/tmp/crystal" interpreter=1 compiler_spec -make[2]: Entering directory '/build/reproducible-path/crystal-1.18.2+dfsg' -Using /usr/bin/llvm-config-19 [version=19.1.7] -CRYSTAL_CONFIG_BUILD_COMMIT="" CRYSTAL_CONFIG_PATH=lib:/usr/lib/crystal/lib SOURCE_DATE_EPOCH="1764087593" ./bin/crystal build -D strict_multi_assign -D preview_overload_order --release --progress --threads 40 --link-flags="-Wl,-z,relro" --exclude-warnings spec/std --exclude-warnings spec/compiler --exclude-warnings spec/primitives --exclude-warnings src/float/printer -o .build/compiler_spec spec/compiler_spec.cr --release -Using compiled compiler at .build/crystal -In lib/markd/src/markd/utils.cr:5:36 - - 5 | def self.timer(label : String, measure_time? : Bool) - ^ -Warning: invalid parameter name: measure_time? - -In lib/markd/src/markd/renderers/html_renderer.cr:238:7 - - 238 | {% if Crystal::VERSION < "1.2.0" %} - ^ -Warning: expanding macro - - -There was a problem expanding macro 'macro_139733678513968' - -Called macro defined in lib/markd/src/markd/renderers/html_renderer.cr:238:7 - - 238 | {% if Crystal::VERSION < "1.2.0" %} - -Which expanded to: - - 1 | - > 2 | title = URI.encode(node.first_child.text) - 3 | @output_io << %() - 4 | -Warning: Deprecated URI.encode. Use `.encode_path` instead. - -A total of 2 warnings were found. -[1/13] Parse [1/13] Parse [2/13] Semantic (top level) [2/13] Semantic (top level) [3/13] Semantic (new) [3/13] Semantic (new) [4/13] Semantic (type declarations) [4/13] Semantic (type declarations) [5/13] Semantic (abstract def check) [5/13] Semantic (abstract def check) [6/13] Semantic (restrictions augmenter) [6/13] Semantic (restrictions augmenter) [7/13] Semantic (ivars initializers) [7/13] Semantic (ivars initializers) [8/13] Semantic (cvars initializers) [8/13] Semantic (cvars initializers) [9/13] Semantic (main) [9/13] Semantic (main) [10/13] Semantic (cleanup) [10/13] Semantic (cleanup) [11/13] Semantic (recursive struct check) [11/13] Semantic (recursive struct check) [12/13] Codegen (crystal) [12/13] Codegen (crystal) [13/13] Codegen (bc+obj) [13/13] [0/1] Codegen (bc+obj) [13/13] [1/1] Codegen (bc+obj) [13/13] [1/1] Codegen (bc+obj) [14/13] Codegen (linking) [14/13] Codegen (linking) .build/compiler_spec -v --order=random -Randomized with seed: 35365 -Codegen: until - codegens until codegens until -Semantic: c union - errors if using void in union field type errors if using void in union field type - types union setter types union setter - types union getter types union getter - types c union types c union - errors if setting closure errors if setting closure - types union setter via pointer types union setter via pointer - errors on empty c union (#633) errors on empty c union (#633) - errors if using void via typedef in union field type errors if using void via typedef in union field type - types Union#new types Union#new - types union getter via pointer types union getter via pointer -Semantic: union - types union of classes types union of classes - doesn't virtualize union elements (#7814) doesn't virtualize union elements (#7814) - finds method in Value finds method in Value - finds method in Object finds method in Object - can reopen Union and access T can reopen Union and access T - can iterate T can iterate T - doesn't crash with union of no-types (#5805) doesn't crash with union of no-types (#5805) - can use Union in type restriction (#2988) can use Union in type restriction (#2988) - treats void as nil in union treats void as nil in union - merges types in the same hierarchy with Union merges types in the same hierarchy with Union - errors if instantiates union errors if instantiates union - assigns to union and keeps new union type in call assigns to union and keeps new union type in call - supports macro if inside union supports macro if inside union - types union types union - doesn't run virtual lookup on unbound unions (#9173) doesn't run virtual lookup on unbound unions (#9173) - types union when obj is union types union when obj is union - types union when both obj and arg are union types union when both obj and arg are union - looks up type in union type with free var looks up type in union type with free var - commutativity - uninstantiated generic super-metaclass v.s. uninstantiated generic sub-metaclass uninstantiated generic super-metaclass v.s. uninstantiated generic sub-metaclass - virtual metaclass v.s. generic subclass instance metaclass virtual metaclass v.s. generic subclass instance metaclass - generic module instance v.s. extending generic module instance metaclass generic module instance v.s. extending generic module instance metaclass - superclass v.s. uninstantiated generic subclass superclass v.s. uninstantiated generic subclass - module v.s. including module module v.s. including module - generic module instance v.s. including module generic module instance v.s. including module - module v.s. including generic module instance module v.s. including generic module instance - generic module instance v.s. including generic module instance generic module instance v.s. including generic module instance - module v.s. extending generic module instance metaclass module v.s. extending generic module instance metaclass - types union of same type types union of same type - can reopen Union can reopen Union - types union when arg is union types union when arg is union -Code gen: var - codegens var codegens var - codegens bug with union of int, nil and string (2): assigning nil to union must fill all zeros codegens bug with union of int, nil and string (2): assigning nil to union must fill all zeros - codegens bug with instance vars and ssa codegens bug with instance vars and ssa - codegens ivar assignment when not-nil type filter applies codegens ivar assignment when not-nil type filter applies - assigns to underscore assigns to underscore - works with typeof with assignment (#828) works with typeof with assignment (#828) - codegens assignment that can never be reached codegens assignment that can never be reached - codegens var with type declaration codegens var with type declaration - codegens bug with var, while, if, break and ssa codegens bug with var, while, if, break and ssa - codegens bug with union of int, nil and string (1): assigning nil to union must fill all zeros codegens bug with union of int, nil and string (1): assigning nil to union must fill all zeros -Semantic: special vars - infers in block with nested block infers in block with nested block - types $? when not defined as no return (2) types $? when not defined as no return (2) - infers in block infers in block - infers $? infers $? - types $~ when not defined as no return types $~ when not defined as no return - types $? when not defined as no return types $? when not defined as no return - errors if assigning $? at top level errors if assigning $? at top level - errors if assigning $~ at top level errors if assigning $~ at top level - types $~ when not defined as no return (2) types $~ when not defined as no return (2) - infers when assigning inside block infers when assigning inside block - infers $~ infers $~ - infers after block infers after block -Parser warnings - warns on missing space before colon - in return type restriction in return type restriction - in block param type restriction in block param type restriction - in type declaration in type declaration - in anonymous block param type restriction in anonymous block param type restriction - warns on suffix-less UInt64 literals > Int64::MAX warns on suffix-less UInt64 literals > Int64::MAX -Crystal::Repl::Interpreter - structs - does simple class instance var initializer does simple class instance var initializer - interprets read instance var of struct interprets read instance var of struct - does call receiver by value from VirtualType abstract struct to concrete struct (#12190) does call receiver by value from VirtualType abstract struct to concrete struct (#12190) - mutates struct inside union mutates struct inside union - casts def body to def type casts def body to def type - does call receiver by value from VirtualType abstract struct to union does call receiver by value from VirtualType abstract struct to union - does class instance var initializer inheritance does class instance var initializer inheritance - sets multiple instance vars in virtual abstract struct call (#12187) sets multiple instance vars in virtual abstract struct call (#12187) - mutates struct stored in class var mutates struct stored in class var - does complex class instance var initializer does complex class instance var initializer - does constructor does constructor - inlines struct method that returns self (#12253) inlines struct method that returns self (#12253) - does allocate, set instance var and get instance var does allocate, set instance var and get instance var - discards allocate discards allocate - does simple struct instance var initializer does simple struct instance var initializer -Crystal::Repl::Interpreter - responds_to? - does responds_to? does responds_to? - doesn't crash if def body ends up with no type (#12219) doesn't crash if def body ends up with no type (#12219) -Semantic: super - doesn't error if invoking super and match isn't found in direct superclass (even though it's find in one superclass) doesn't error if invoking super and match isn't found in direct superclass (even though it's find in one superclass) - errors no superclass method in top-level def errors no superclass method in top-level def - calls super in module method (3) (#556) calls super in module method (3) (#556) - gives correct error when calling super and target is abstract method (#2675) gives correct error when calling super and target is abstract method (#2675) - says correct error message when no overload matches in super call (#272) says correct error message when no overload matches in super call (#272) - errors no superclass method in top-level errors no superclass method in top-level - calls super in generic module method calls super in generic module method - types super when inside fun and forwards args types super when inside fun and forwards args - errors if calling super on module method and not found errors if calling super on module method and not found - types super when container method is defined in parent class types super when container method is defined in parent class - finds super initialize if not explicitly defined in superclass, 2 (#273) finds super initialize if not explicitly defined in superclass, 2 (#273) - errors if invoking super and match isn't found in direct superclass in initialize (even though it's find in one superclass) errors if invoking super and match isn't found in direct superclass in initialize (even though it's find in one superclass) - types super without arguments and instance variable types super without arguments and instance variable - types super with forwarded arguments, parent has parameters types super with forwarded arguments, parent has parameters - types super with named arguments, def has bare splat parameter (2) (#8895) types super with named arguments, def has bare splat parameter (2) (#8895) - types super with forwarded arguments, different internal names (#8895) types super with forwarded arguments, different internal names (#8895) - calls super in module method (1) (#556) calls super in module method (1) (#556) - types super when inside fun types super when inside fun - types super with named arguments, def has bare splat parameter (#8895) types super with named arguments, def has bare splat parameter (#8895) - finds super initialize if not explicitly defined in superclass, 1 (#273) finds super initialize if not explicitly defined in superclass, 1 (#273) - errors on super where only target would be a top level method (#5201) errors on super where only target would be a top level method (#5201) - types super when container method is defined in parent class two levels up types super when container method is defined in parent class two levels up - errors on super outside method (#4481) errors on super outside method (#4481) - types super with forwarded arguments, def has double splat parameter (#8895) types super with forwarded arguments, def has double splat parameter (#8895) - calls super in module method (2) (#556) calls super in module method (2) (#556) - errors no superclass method errors no superclass method - invokes super inside macro (#6636) invokes super inside macro (#6636) - types super without arguments types super without arguments - types super with forwarded arguments, def has bare splat parameter (#8895) types super with forwarded arguments, def has bare splat parameter (#8895) -Normalize: multi assign - normalizes n to n normalizes n to n - normalizes n to n with call normalizes n to n with call - normalizes 1 to n, with splat on left-hand side, splat after other targets normalizes 1 to n, with splat on left-hand side, splat after other targets - normalizes m to n, with splat on left-hand side, splat is empty normalizes m to n, with splat on left-hand side, splat is empty - normalizes m to n, with *_ on left-hand side (3) normalizes m to n, with *_ on left-hand side (3) - normalizes m to n, with splat on left-hand side, splat is non-empty normalizes m to n, with splat on left-hand side, splat is non-empty - normalizes 1 to n, with *_ on left-hand side (3) normalizes 1 to n, with *_ on left-hand side (3) - normalizes 1 to n, with splat on left-hand side, splat before other targets normalizes 1 to n, with splat on left-hand side, splat before other targets - normalizes m to n, with *_ on left-hand side (1) normalizes m to n, with *_ on left-hand side (1) - normalizes 1 to n, with *_ on left-hand side (2) normalizes 1 to n, with *_ on left-hand side (2) - normalizes 1 to n, with *_ on left-hand side (1) normalizes 1 to n, with *_ on left-hand side (1) - strict_multi_assign - normalizes 1 to n with [] normalizes 1 to n with [] - normalizes 1 to n with call normalizes 1 to n with call - normalizes 1 to n normalizes 1 to n - without strict_multi_assign - normalizes 1 to n with call normalizes 1 to n with call - normalizes 1 to n normalizes 1 to n - normalizes 1 to n with [] normalizes 1 to n with [] - normalizes n to n with [] normalizes n to n with [] - normalizes 1 to n, with splat on left-hand side normalizes 1 to n, with splat on left-hand side - normalizes n to *_ on left-hand side normalizes n to *_ on left-hand side - normalizes n to splat on left-hand side normalizes n to splat on left-hand side - normalizes m to n, with *_ on left-hand side (2) normalizes m to n, with *_ on left-hand side (2) - normalizes 1 to splat on left-hand side normalizes 1 to splat on left-hand side - normalizes 1 to *_ on left-hand side normalizes 1 to *_ on left-hand side -Crystal::Macro - splat methods - executes exp executes exp - exception handler methods - executes body executes body - executes else (nop) executes else (nop) - executes ensure (nop) executes ensure (nop) - executes rescue body executes rescue body - executes else executes else - executes rescue types executes rescue types - executes ensure executes ensure - executes rescues executes rescues - executes rescue name executes rescue name - Crystal::NamedTupleLiteral - executes double splat executes double splat - executes keys executes keys - #each - without the value argument - builds the correct array builds the correct array - without either argument - builds the correct array builds the correct array - without the key argument - builds the correct array builds the correct array - with both arguments - builds the correct array builds the correct array - executes double splat with arg executes double splat with arg - executes is_a? executes is_a? - executes empty? executes empty? - executes map executes map - executes [] not found executes [] not found - executes [] with invalid key type executes [] with invalid key type - creates a named tuple literal with a var creates a named tuple literal with a var - executes double splat executes double splat - executes size executes size - executes [] executes [] - executes has_key? executes has_key? - executes to_a executes to_a - executes []= executes []= - executes values executes values - Crystal::ArrayLiteral - executes splat with symbols and strings executes splat with symbols and strings - executes map with arg executes map with arg - executes [] with incomplete range executes [] with incomplete range - executes map executes map - #map_with_index - without the index argument - returns the resulting array returns the resulting array - without the element argument - returns the resulting array returns the resulting array - with both arguments - returns the resulting array returns the resulting array - without either argument - returns the resulting array returns the resulting array - #- - with ArrayLiteral argument - removes the elements in RHS from LHS into an ArrayLiteral removes the elements in RHS from LHS into an ArrayLiteral - with TupleLiteral argument - removes the elements in RHS from LHS into an ArrayLiteral removes the elements in RHS from LHS into an ArrayLiteral - executes push executes push - executes of (nop) executes of (nop) - executes find (doesn't find) executes find (doesn't find) - executes all? (false) executes all? (false) - executes [] with two numbers executes [] with two numbers - executes map with constants executes map with constants - executes []= executes []= - executes sort_by executes sort_by - executes unshift executes unshift - executes includes? executes includes? - executes splat with splat executes splat with splat - executes index out of bounds executes index out of bounds - executes select executes select - executes identify executes identify - executes [] with computed range executes [] with computed range - executes is_a? executes is_a? - executes * executes * - executes last executes last - executes reject executes reject - executes first executes first - #+ - with ArrayLiteral argument - concatenates the literals into an ArrayLiteral concatenates the literals into an ArrayLiteral - with TupleLiteral argument - concatenates the literals into an ArrayLiteral concatenates the literals into an ArrayLiteral - executes sort with ids and strings executes sort with ids and strings - executes type executes type - executes sort with numbers executes sort with numbers - executes uniq executes uniq - executes index 0 executes index 0 - calls block exactly once for each element in #sort_by calls block exactly once for each element in #sort_by - executes index 1 executes index 1 - executes any? (false) executes any? (false) - executes sort with strings executes sort with strings - executes all? (true) executes all? (true) - executes reduce with no initial value executes reduce with no initial value - executes [] with range executes [] with range - executes splat executes splat - executes reduce with initial value executes reduce with initial value - executes join executes join - #each #each - executes any? (true) executes any? (true) - executes find (finds) executes find (finds) - executes of executes of - executes join with strings executes join with strings - executes sort with ids executes sort with ids - #each_with_index - with both arguments - builds the correct array builds the correct array - without the index argument - builds the correct array builds the correct array - without either argument - builds the correct array builds the correct array - without the element argument - builds the correct array builds the correct array - executes type (nop) executes type (nop) - executes empty? executes empty? - executes size executes size - creates an array literal with a var creates an array literal with a var - Crystal::External - executes is_a? executes is_a? - Crystal::RangeLiteral - executes map executes map - executes excludes_end? executes excludes_end? - executes end executes end - executes to_a executes to_a - #each #each - executes begin executes begin - Crystal::ModuleDef - executes name executes name - executes splat_index executes splat_index - executes kind executes kind - executes body executes body - executes type_vars executes type_vars - Crystal::TupleLiteral - executes splat with splat executes splat with splat - executes size executes size - executes includes? executes includes? - executes first executes first - executes sort with ids executes sort with ids - executes all? (true) executes all? (true) - executes join executes join - creates a tuple literal with a var creates a tuple literal with a var - executes join with strings executes join with strings - executes last executes last - executes splat with symbols and strings executes splat with symbols and strings - executes [] with incomplete range executes [] with incomplete range - executes map with arg executes map with arg - #+ - with TupleLiteral argument - concatenates the literals into a TupleLiteral concatenates the literals into a TupleLiteral - with ArrayLiteral argument - concatenates the literals into a TupleLiteral concatenates the literals into a TupleLiteral - executes reject executes reject - executes splat executes splat - executes any? (true) executes any? (true) - executes map executes map - executes sort with numbers executes sort with numbers - executes find (doesn't find) executes find (doesn't find) - #- - with TupleLiteral argument - removes the elements in RHS from LHS into a TupleLiteral removes the elements in RHS from LHS into a TupleLiteral - with ArrayLiteral argument - removes the elements in RHS from LHS into a TupleLiteral removes the elements in RHS from LHS into a TupleLiteral - executes is_a? executes is_a? - executes [] with computed range executes [] with computed range - executes push executes push - executes [] with 0 executes [] with 0 - executes [] with range executes [] with range - executes map with constants executes map with constants - executes any? (false) executes any? (false) - executes sort with ids and strings executes sort with ids and strings - #map_with_index - without the element argument - returns the resulting tuple returns the resulting tuple - with both arguments - returns the resulting tuple returns the resulting tuple - without either argument - returns the resulting tuple returns the resulting tuple - without the index argument - returns the resulting tuple returns the resulting tuple - executes [] out of bounds executes [] out of bounds - executes [] with 1 executes [] with 1 - executes splat with arg executes splat with arg - executes unshift executes unshift - executes uniq executes uniq - executes all? (false) executes all? (false) - #each #each - executes * executes * - executes empty? executes empty? - executes select executes select - #each_with_index - with both arguments - builds the correct array builds the correct array - without the index argument - builds the correct array builds the correct array - without the element argument - builds the correct array builds the correct array - without either argument - builds the correct array builds the correct array - executes sort with strings executes sort with strings - executes find (finds) executes find (finds) - Crystal::Alias - executes name executes name - executes type executes type - Crystal::CStructOrUnionDef - executes body executes body - executes kind executes kind - executes union? executes union? - executes name executes name - require methods - executes path executes path - visibility modifier methods - executes exp executes exp - executes visibility executes visibility - union methods - executes resolve executes resolve - executes resolve? executes resolve? - executes types executes types - proc literal methods - executes args executes args - executes body executes body - executes return_type executes return_type - Crystal::Extend - executes name executes name - metavar methods - executes id executes id - executes name executes name - executes is_a? executes is_a? - executes nothing executes nothing - case methods - in - executes when exhaustive? executes when exhaustive? - executes whens executes whens - executes exhaustive? executes exhaustive? - when - executes else executes else - executes when conds executes when conds - executes cond executes cond - executes whens executes whens - executes when body executes when body - executes when exhaustive? executes when exhaustive? - executes exhaustive? executes exhaustive? - offsetof methods - executes type executes type - executes offset executes offset - block methods - executes body executes body - executes splat_index executes splat_index - executes args executes args - global methods - executes name executes name - Crystal::MacroLiteral - executes value executes value - #parse_type - union - | union - | - metaclass metaclass - raises on extra unparsed tokens after the type raises on extra unparsed tokens after the type - union - Union union - Union - generic generic - raises on extra unparsed tokens before the type raises on extra unparsed tokens before the type - raises on empty string raises on empty string - raises on non StringLiteral arguments raises on non StringLiteral arguments - path path - proc proc - exposes syntax warnings exposes syntax warnings - union - in generic union - in generic - Crystal::ExternalVar - executes type executes type - executes name executes name - executes real_name executes real_name - compares versions compares versions - #warning - emits a top level warning emits a top level warning - call methods - executes named args executes named args - executes global? executes global? - executes named args name executes named args name - executes name executes name - executes block executes block - executes receiver executes receiver - executes named args value executes named args value - executes args executes args - executes block arg executes block arg - executes block arg (nop) executes block arg (nop) - Crystal::Primitive - executes name executes name - Crystal::MacroExpression - executes output? executes output? - executes exp executes exp - responds_to methods - executes name executes name - executes receiver executes receiver - Crystal::LibDef - executes kind executes kind - executes body executes body - executes name executes name - proc pointer methods - executes args when empty executes args when empty - executes obj when absent executes obj when absent - executes name executes name - executes global? executes global? - executes obj when present executes obj when present - executes args when not empty executes args when not empty - executes assign executes assign - if methods - executes else executes else - executes then executes then - executes cond executes cond - executes else (nop) executes else (nop) - multi_assign methods - executes targets executes targets - executes values executes values - nilable cast methods - executes to executes to - executes obj executes obj - Crystal::TypeDef - executes type executes type - executes name executes name - control expression methods - executes exp (nop) executes exp (nop) - executes exp executes exp - Crystal::AnnotationDef - executes name executes name - executes body executes body - executes kind executes kind - printing - p p - pp! pp! - p! p! - puts puts - print print - pp pp - regex methods - executes source executes source - executes options executes options - arg methods - executes internal_name executes internal_name - executes default_value executes default_value - executes name executes name - executes restriction executes restriction - classvar methods - executes name executes name - Crystal::Include - executes name executes name - executes assign without output executes assign without output - type declaration methods - executes var executes var - executes value executes value - executes var when instance var executes var when instance var - executes type executes type - macro id methods - compares with string compares with string - compares with symbol compares with symbol - forwards methods to string forwards methods to string - node methods - #doc - returns an empty string if there are no docs on the node (wants_doc = false) returns an empty string if there are no docs on the node (wants_doc = false) - returns the call's docs if present (wants_doc = true) returns the call's docs if present (wants_doc = true) - returns a multiline comment returns a multiline comment - executes == on symbols (false) (#240) executes == on symbols (false) (#240) - #nil? - NumberLiteral NumberLiteral - Nop Nop - NilLiteral NilLiteral - executes != on numbers (true) executes != on numbers (true) - symbolize - expands macro with symbolize call on id expands macro with symbolize call on id - expands macro with symbolize call on symbol expands macro with symbolize call on symbol - expands macro with symbolize call on string expands macro with symbolize call on string - executes == on numbers (true) executes == on numbers (true) - #is_a? - union argument, contains NoReturn union argument, contains NoReturn - union argument, unimplemented types union argument, unimplemented types - union argument, undefined types union argument, undefined types - union argument, mergeable union argument, mergeable - union argument union argument - union argument, duplicate type union argument, duplicate type - location - filename filename - column number column number - line_number line_number - end column number end column number - end line_number end line_number - stringify - expands macro with stringify call on number expands macro with stringify call on number - expands macro with stringify call on call expands macro with stringify call on call - expands macro with stringify call on string expands macro with stringify call on string - expands macro with stringify call on symbol expands macro with stringify call on symbol - executes != on numbers (false) executes != on numbers (false) - #doc_comment - returns the call's docs if present as a MacroId (wants_doc = true) returns the call's docs if present as a MacroId (wants_doc = true) - returns an empty MacroId if there are no docs on the node (wants_doc = false) returns an empty MacroId if there are no docs on the node (wants_doc = false) - ensures each newline has a `#` prefix ensures each newline has a `#` prefix - executes == on numbers (false) executes == on numbers (false) - executes == on symbols (true) (#240) executes == on symbols (true) (#240) - id - expands macro with id call on number expands macro with id call on number - expands macro with id call on char expands macro with id call on char - expands macro with id call on call expands macro with id call on call - expands macro with id call on symbol expands macro with id call on symbol - expands macro with id call on path expands macro with id call on path - expands macro with id call on string expands macro with id call on string - expands macro with id call on global path expands macro with id call on global path - class_name - executes class_name executes class_name - executes class_name executes class_name - executes class_name executes class_name - executes class_name executes class_name - executes class_name executes class_name - executes class_name executes class_name - instancevar methods - executes name executes name - Crystal::TypeOf - executes args executes args - number methods - executes <= (false) executes <= (false) - executes <= (true) executes <= (true) - executes math operations using U/Int128 executes math operations using U/Int128 - executes // executes // - executes kind executes kind - executes < (true) executes < (true) - executes + and preserves type executes + and preserves type - executes > (true) executes > (true) - executes | executes | - executes & executes & - executes unary + executes unary + - executes >= (false) executes >= (false) - #to_number #to_number - executes >= (true) executes >= (true) - executes <=> executes <=> - preserves integer size (#10713) preserves integer size (#10713) - executes unary ~ executes unary ~ - executes < (false) executes < (false) - executes % executes % - executes > (false) executes > (false) - executes unary - executes unary - - executes <=> (returns nil) executes <=> (returns nil) - executes << executes << - executes - executes - - executes >> executes >> - executes ^ executes ^ - executes + with float executes + with float - executes + executes + - executes * executes * - executes ** executes ** - env - doesn't have key doesn't have key - has key has key - metaclass methods - executes resolve executes resolve - executes resolve? executes resolve? - executes instance executes instance - proc notation methods - executes resolve executes resolve - gets empty output gets empty output - gets single output gets single output - executes resolve? executes resolve? - gets single input gets single input - gets multiple inputs gets multiple inputs - expressions methods - executes expressions executes expressions - Crystal::Asm - executes outputs executes outputs - executes can_throw? executes can_throw? - executes intel? executes intel? - executes text executes text - executes clobbers executes clobbers - executes inputs executes inputs - executes alignstack? executes alignstack? - executes volatile? executes volatile? - cast methods - executes to executes to - executes obj executes obj - Crystal::HashLiteral - executes is_a? executes is_a? - executes of_key (nop) executes of_key (nop) - executes double splat with arg executes double splat with arg - #each - without either argument - builds the correct array builds the correct array - without the key argument - builds the correct array builds the correct array - without the value argument - builds the correct array builds the correct array - with both arguments - builds the correct array builds the correct array - executes of_key executes of_key - executes has_key? executes has_key? - creates a hash literal with a var creates a hash literal with a var - executes double splat executes double splat - executes to_a executes to_a - executes type (nop) executes type (nop) - executes keys executes keys - executes map executes map - executes [] executes [] - executes []= executes []= - executes double splat executes double splat - executes of_value (nop) executes of_value (nop) - executes values executes values - executes of_value executes of_value - executes [] not found executes [] not found - executes size executes size - executes type executes type - executes empty? executes empty? - generic methods - executes named_args executes named_args - executes types executes types - executes type_vars executes type_vars - executes resolve executes resolve - executes name executes name - executes resolve? executes resolve? - Crystal::EnumDef - executes name executes name - executes base_type executes base_type - executes body executes body - executes kind executes kind - readinstancevar methods - executes obj executes obj - executes name executes name - string methods - executes strip executes strip - executes camelcase executes camelcase - executes count executes count - executes to_i(base) executes to_i(base) - executes string includes? string (false) executes string includes? string (false) - executes string starts_with? char (true) executes string starts_with? char (true) - executes camelcase with lower executes camelcase with lower - executes string > string executes string > string - executes string + char executes string + char - executes string ends_with? char (true) executes string ends_with? char (true) - executes split with char argument executes split with char argument - executes [] with incomplete range executes [] with incomplete range - executes string chomp executes string chomp - executes to_i executes to_i - executes string ends_with? string (false) executes string ends_with? string (false) - executes string includes? char (false) executes string includes? char (false) - executes string ends_with? string (true) executes string ends_with? string (true) - executes split without arguments executes split without arguments - executes titleize executes titleize - executes gsub executes gsub - executes [] with computed range executes [] with computed range - executes underscore executes underscore - executes camelcase with invalid lower arg type executes camelcase with invalid lower arg type - executes size executes size - executes scan executes scan - executes string starts_with? char (false) executes string starts_with? char (false) - executes string < macroid executes string < macroid - executes split with argument executes split with argument - executes string starts_with? string (true) executes string starts_with? string (true) - executes string ends_with? char (false) executes string ends_with? char (false) - executes downcase executes downcase - executes string < string executes string < string - executes string * number executes string * number - executes [] with exclusive range executes [] with exclusive range - executes string includes? string (true) executes string includes? string (true) - executes string > macroid executes string > macroid - executes to_utf16 executes to_utf16 - executes capitalize executes capitalize - executes string + string executes string + string - executes string == string executes string == string - executes tr executes tr - executes string =~ (false) executes string =~ (false) - executes string starts_with? string (false) executes string starts_with? string (false) - executes upcase executes upcase - executes string includes? char (true) executes string includes? char (true) - executes string != string executes string != string - executes chars executes chars - executes empty executes empty - executes [] with inclusive range executes [] with inclusive range - executes lines executes lines - executes string =~ (true) executes string =~ (true) - unary expression methods - executes exp executes exp - executes is_a? executes is_a? - yield methods - executes expressions executes expressions - executes scope executes scope - executes scope (nop) executes scope (nop) - assign methods - executes target executes target - executes value executes value - while methods - executes cond executes cond - executes body executes body - path methods - executes names executes names - executes resolve? executes resolve? - executes global? executes global? - executes global executes global - executes resolve executes resolve - executes types executes types - macro for methods - executes exp executes exp - executes body executes body - executes vars executes vars - Crystal::MacroVar - executes expressions executes expressions - executes name executes name - or methods - executes right executes right - executes left executes left - instancevar methods - executes name executes name - Crystal::TypeNode - #instance_vars - errors when called from top-level scope errors when called from top-level scope - executes instance_vars executes instance_vars - does not error when called from def scope does not error when called from def scope - executes >= executes >= - executes resolve? executes resolve? - #includers - returns an array of types `self` is directly included in returns an array of types `self` is directly included in - executes superclass executes superclass - executes < executes < - executes <= executes <= - executes class methods executes class methods - #module? - Crystal::NonGenericModuleType Crystal::NonGenericModuleType - Crystal::NonGenericClassType - struct struct - class class - Crystal::GenericClassType - struct struct - class class - Crystal::GenericModuleType Crystal::GenericModuleType - executes private? - false false - true true - executes class vars (with inheritance) executes class vars (with inheritance) - executes ancestors (with generic) executes ancestors (with generic) - executes union_types (non-union) executes union_types (non-union) - #struct? - Crystal::NonGenericClassType - struct struct - class class - Crystal::NonGenericModuleType Crystal::NonGenericModuleType - Crystal::GenericModuleType Crystal::GenericModuleType - Crystal::GenericClassType - struct struct - class class - #union? - false false - true true - #warning - emits a warning at a specific node emits a warning at a specific node - executes != executes != - executes ancestors executes ancestors - executes == executes == - executes > executes > - #id - does not include trailing + for virtual type does not include trailing + for virtual type - executes class_vars on metaclass executes class_vars on metaclass - executes size of tuple executes size of tuple - #class? - Crystal::NonGenericClassType - class class - struct struct - Crystal::GenericClassType - struct struct - class class - Crystal::GenericModuleType Crystal::GenericModuleType - Crystal::NonGenericModuleType Crystal::NonGenericModuleType - executes class_vars on symbol type executes class_vars on symbol type - executes type_vars executes type_vars - executes resolve executes resolve - public? - true true - false false - executes instance executes instance - #has_inner_pointers? - works on structs works on structs - works on references works on references - works on ReferenceStorage works on ReferenceStorage - works on primitive values works on primitive values - errors when called from top-level scope errors when called from top-level scope - does not error when called from def scope does not error when called from def scope - executes union_types (union) executes union_types (union) - #nilable? - false false - true true - #abstract? - Crystal::GenericModuleType Crystal::GenericModuleType - Crystal::NonGenericClassType - struct - abstract abstract - non-abstract non-abstract - class - non-abstract non-abstract - abstract abstract - Crystal::GenericClassType - struct - abstract abstract - non-abstract non-abstract - class - abstract abstract - non-abstract non-abstract - Crystal::NonGenericModuleType Crystal::NonGenericModuleType - #name - generic_args - false - does not include the generic_args of the instantiated type does not include the generic_args of the instantiated type - does not include the generic_args of the type does not include the generic_args of the type - with an invalid type argument - should raise the proper exception should raise the proper exception - true - includes the generic_args of the instantiated type includes the generic_args of the instantiated type - includes the generic_args of the type includes the generic_args of the type - generic type - includes the generic_args of the type by default includes the generic_args of the type by default - includes the generic_args of the instantiated type by default includes the generic_args of the instantiated type by default - namespaced type - should return the FQN of the type should return the FQN of the type - simple type - returns the name of the type returns the name of the type - generic instance - prints empty splat type var prints empty splat type var - prints multiple arguments for splat type var prints multiple arguments for splat type var - does not print extra commas for empty splat type var (1) does not print extra commas for empty splat type var (1) - does not print extra commas for empty splat type var (3) does not print extra commas for empty splat type var (3) - does not print extra commas for empty splat type var (2) does not print extra commas for empty splat type var (2) - prints generic type arguments prints generic type arguments - == and != devirtualize generic type arguments (#10730) == and != devirtualize generic type arguments (#10730) - executes size of tuple metaclass executes size of tuple metaclass - executes instance_vars on metaclass executes instance_vars on metaclass - visibility - private private - public public - executes instance_vars on symbol type executes instance_vars on symbol type - executes class vars executes class vars - executes methods executes methods - executes class executes class - macro methods - executes visibility executes visibility - executes splat_index executes splat_index - executes double_splat executes double_splat - executes body executes body - executes name executes name - executes block_arg executes block_arg - executes args executes args - char methods - executes zero? executes zero? - executes ord executes ord - is_a methods - executes receiver executes receiver - executes arg executes arg - annotation methods - executes [] with SymbolLiteral executes [] with SymbolLiteral - executes name executes name - executes [] with StringLiteral executes [] with StringLiteral - executes [] with MacroId executes [] with MacroId - executes [] with other ASTNode, but raises an error executes [] with other ASTNode, but raises an error - executes [] with NumberLiteral executes [] with NumberLiteral - macro if methods - executes else executes else - executes cond executes cond - executes then executes then - executes is_unless? executes is_unless? - symbol methods - forwards methods to string forwards methods to string - executes symbol == symbol executes symbol == symbol - executes symbol != symbol executes symbol != symbol - Crystal::FunDef - executes args executes args - executes has_body? executes has_body? - executes return_type executes return_type - executes variadic? executes variadic? - executes body executes body - executes real_name executes real_name - executes name executes name - Crystal::Select - executes else executes else - executes whens executes whens - and methods - executes right executes right - executes left executes left - uninitialized var methods - executes type executes type - executes var executes var - flag? - doesn't have flag doesn't have flag - has flag has flag - Crystal::AsmOperand - executes exp executes exp - executes constraint executes constraint - Crystal::ClassDef - executes type_vars executes type_vars - executes superclass executes superclass - executes kind executes kind - executes splat_index executes splat_index - executes body executes body - executes name executes name - executes struct? executes struct? - executes abstract? executes abstract? - def methods - executes body executes body - executes receiver executes receiver - executes free_vars executes free_vars - executes block_arg executes block_arg - executes abstract? executes abstract? - executes return_type executes return_type - executes name executes name - executes accepts_block? executes accepts_block? - executes splat_index executes splat_index - executes double_splat executes double_splat - executes args executes args - executes visibility executes visibility -Normalize: return next break - removes nodes after break removes nodes after break - removes nodes after next removes nodes after next - removes nodes after return removes nodes after return - doesn't remove after return when there's an unless doesn't remove after return when there's an unless - removes nodes after if that returns in both branches removes nodes after if that returns in both branches - doesn't remove nodes after if that returns in one branch doesn't remove nodes after if that returns in one branch -Semantic: require - file not found - relative wildcard relative wildcard - relative require relative require - wildcard wildcard - require require -Normalize: regex literal - StringInterpolation - simple simple - StringLiteral - expands to const expands to const - simple simple - options - im im - imx imx - i i - empty empty - x x -Semantic: macro - finds metaclass instance of instance method (#4739) finds metaclass instance of instance method (#4739) - allows declaring class with macro for allows declaring class with macro for - allows specifying self as macro def return type (2) allows specifying self as macro def return type (2) - uses splat and double splat uses splat and double splat - works inside proc literal (#2984) works inside proc literal (#2984) - finds var in proc for macros finds var in proc for macros - finds type for global path shared with free var finds type for global path shared with free var - finds macro through alias (#2706) finds macro through alias (#2706) - doesn't die on && inside if (bug) doesn't die on && inside if (bug) - unpacks block parameters inside macros (#13742) unpacks block parameters inside macros (#13742) - allows specifying self as macro def return type allows specifying self as macro def return type - uses bare * uses bare * - types macro def types macro def - does macro verbatim outside macro does macro verbatim outside macro - finds method before macro (#236) finds method before macro (#236) - expands multiline macro expression in verbatim (#6643) expands multiline macro expression in verbatim (#6643) - types macro def that calls another method inside a class types macro def that calls another method inside a class - preserves correct self in restriction when macro def is to be instantiated in subtypes (#5044) preserves correct self in restriction when macro def is to be instantiated in subtypes (#5044) - cannot lookup type defined in caller class cannot lookup type defined in caller class - errors if macro def type not found errors if macro def type not found - errors when trying to define def inside def with macro expansion errors when trying to define def inside def with macro expansion - declares multi-assign vars for macro declares multi-assign vars for macro - solves macro expression arguments before macro expansion (constant) solves macro expression arguments before macro expansion (constant) - does macro verbatim inside macro does macro verbatim inside macro - types macro types macro - finds generic type argument of included module finds generic type argument of included module - can use macro in instance var initializer (just assignment) (#7666) can use macro in instance var initializer (just assignment) (#7666) - finds free type vars finds free type vars - evaluates yield expression (#2924) evaluates yield expression (#2924) - finds generic in macro code using free var finds generic in macro code using free var - allows declaring class with inline macro expression (#1333) allows declaring class with inline macro expression (#1333) - gives correct error when method is invoked but macro exists at the same scope gives correct error when method is invoked but macro exists at the same scope - can return virtual class type in macro def can return virtual class type in macro def - errors if macro def type doesn't match found errors if macro def type doesn't match found - can access variable inside macro expansion (#2057) can access variable inside macro expansion (#2057) - finds metaclass instance of instance method (#4639) finds metaclass instance of instance method (#4639) - doesn't include parameters with default values in missing arguments error doesn't include parameters with default values in missing arguments error - show macro trace in errors (2) show macro trace in errors (2) - says missing argument because positional args don't match past splat says missing argument because positional args don't match past splat - can't define new variables (#466) can't define new variables (#466) - shows correct error message in macro expansion (#7083) shows correct error message in macro expansion (#7083) - types macro def with argument types macro def with argument - errors if missing two arguments errors if missing two arguments - uses uninitialized variable with macros uses uninitialized variable with macros - allows declaring class with macro if allows declaring class with macro if - finds macro and method at the same scope finds macro and method at the same scope - show macro trace in errors (1) show macro trace in errors (1) - can lookup type parameter when macro is called inside class (#5343) can lookup type parameter when macro is called inside class (#5343) - solves macro expression arguments before macro expansion (type) solves macro expression arguments before macro expansion (type) - solves named macro expression arguments before macro expansion (constant) (#2423) solves named macro expression arguments before macro expansion (constant) (#2423) - errors if named arg matches splat parameter errors if named arg matches splat parameter - expands macro with block expands macro with block - unpacks to underscore within block parameters inside macros unpacks to underscore within block parameters inside macros - doesn't crash on syntax error inside macro (regression, #8038) doesn't crash on syntax error inside macro (regression, #8038) - begins with {{ yield }} (#15050) begins with {{ yield }} (#15050) - errors if requires inside class through macro expansion errors if requires inside class through macro expansion - allows named args after splat allows named args after splat - uses bare *, doesn't let more args uses bare *, doesn't let more args - matches with default value after splat matches with default value after splat - can use macro in instance var initializer (#7666) can use macro in instance var initializer (#7666) - expands macro with break inside while (#1852) expands macro with break inside while (#1852) - executes OpAssign (#9356) executes OpAssign (#9356) - errors if missing one argument errors if missing one argument - errors if non-existent named arg errors if non-existent named arg - errors if find macros but missing argument errors if find macros but missing argument - errors if applying protected modifier to macro errors if applying protected modifier to macro - allows union return types for macro def allows union return types for macro def - transforms with {{yield}} and call transforms with {{yield}} and call - applies visibility modifier only to first level applies visibility modifier only to first level - types macro def that calls another method types macro def that calls another method - finds macro in inherited generic class finds macro in inherited generic class - finds generic in macro code finds generic in macro code - assigns to underscore assigns to underscore - solves named macro expression arguments before macro expansion (type) (#2423) solves named macro expression arguments before macro expansion (type) (#2423) - finds macro in included generic module finds macro in included generic module - finds macro in module in Object finds macro in module in Object - checks if macro expansion returns (#821) checks if macro expansion returns (#821) - allows generic return types for macro def allows generic return types for macro def - finds generic type argument of included module with self finds generic type argument of included module with self - errors if named arg matches single splat parameter errors if named arg matches single splat parameter - doesn't error when adding macro call to constant (#2457) doesn't error when adding macro call to constant (#2457) - allows subclasses of return type for macro def allows subclasses of return type for macro def - finds macro and method at the same scope inside included module finds macro and method at the same scope inside included module - can define constant via macro included can define constant via macro included - executes MultiAssign with ArrayLiteral value executes MultiAssign with ArrayLiteral value - executes MultiAssign executes MultiAssign - gives precise location info when doing yield inside macro gives precise location info when doing yield inside macro - finds macro in included module finds macro in included module - errors if requires inside if through macro expansion errors if requires inside if through macro expansion - types macro def that calls another method inside a class types macro def that calls another method inside a class - raise - inside macro - with node - contains the message and not `expanding macro` (#5669) contains the message and not `expanding macro` (#5669) - pointing at the correct node in complex/nested macro (#7147) pointing at the correct node in complex/nested macro (#7147) - renders both frames (#7147) renders both frames (#7147) - points to caller when missing node location information (#7147) points to caller when missing node location information (#7147) - without node - renders both frames (#7147) renders both frames (#7147) - supports an empty message (#8631) supports an empty message (#8631) - does not contain `expanding macro` does not contain `expanding macro` - inside method - without node - renders both frames (#7147) renders both frames (#7147) - errors if declares macro inside if errors if declares macro inside if - uses bare *, doesn't let more args uses bare *, doesn't let more args - declares rescue variable inside for macro declares rescue variable inside for macro - expands macro with block and argument to yield expands macro with block and argument to yield - finds macro in included module at class level (#4639) finds macro in included module at class level (#4639) - can return class type in macro def can return class type in macro def - errors if using macro that is defined later errors if using macro that is defined later - declares variable for macro with out declares variable for macro with out - @caller - returns an array of each call returns an array of each call - returns nil if no stack is available returns nil if no stack is available - provides access to the `Call` information provides access to the `Call` information - assigns to underscore in MultiAssign assigns to underscore in MultiAssign - errors if macro uses undefined variable errors if macro uses undefined variable - looks up argument types in macro owner, not in subclass (#2395) looks up argument types in macro owner, not in subclass (#2395) - gets named arguments in double splat gets named arguments in double splat - double splat and regular args double splat and regular args - allows return values that include the return type of the macro def allows return values that include the return type of the macro def - doesn't affect self restrictions outside the macro def being instantiated in subtypes doesn't affect self restrictions outside the macro def being instantiated in subtypes - can specify tuple as return type can specify tuple as return type - errors if find macros but wrong arguments errors if find macros but wrong arguments - errors if named arg already specified errors if named arg already specified - can override macro (#2773) can override macro (#2773) - clones default value before expanding clones default value before expanding - skip_file macro directive - skips expanding the rest of the current file skips expanding the rest of the current file - skips file inside an if macro expression skips file inside an if macro expression - has correct location after expanding assignment after instance var has correct location after expanding assignment after instance var -Codegen: extern struct - invokes proc with extern struct invokes proc with extern struct - codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI codegens proc that takes an extern struct with C ABI - declares extern union, sets and gets instance var declares extern union, sets and gets instance var - codegens extern proc call twice (#4982) codegens extern proc call twice (#4982) - sets callback on extern struct sets callback on extern struct sets callback on extern struct sets callback on extern struct sets callback on extern struct sets callback on extern struct sets callback on extern struct sets callback on extern struct sets callback on extern struct sets callback on extern struct - codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil codegens proc that takes an extern struct with C ABI, callback returns nil - declares extern struct, sets and gets instance var declares extern struct, sets and gets instance var - codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI - doesn't crash with proc with extern struct that's a closure doesn't crash with proc with extern struct that's a closure - declares extern union with no constructor declares extern union with no constructor - sets callback on extern union sets callback on extern union sets callback on extern union sets callback on extern union sets callback on extern union sets callback on extern union sets callback on extern union sets callback on extern union sets callback on extern union sets callback on extern union - invokes proc with extern struct with sret invokes proc with extern struct with sret - codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI codegens proc that takes and returns an extern struct with C ABI - codegens proc that takes and returns large extern struct by value codegens proc that takes and returns large extern struct by value - codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) codegens proc that takes an extern struct with C ABI (2) - declares extern struct with no constructor, assigns var declares extern struct with no constructor, assigns var - codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret codegens proc that takes and returns an extern struct with sret - declares extern struct with no constructor declares extern struct with no constructor -Semantic: responds_to? - restricts other types inside if else restricts other types inside if else - restricts virtual generic module to including types (#8334) restricts virtual generic module to including types (#8334) - restricts virtual generic superclass to subtypes restricts virtual generic superclass to subtypes - restricts type inside if scope 1 restricts type inside if scope 1 - is bool is bool - restricts in assignment restricts in assignment -Crystal::Repl::Interpreter - multidispatch - does multidispatch with mandatory named arguments does multidispatch with mandatory named arguments - does dispatch on receiver type and argument type, multiple times does dispatch on receiver type and argument type, multiple times - doesn't compile block if it's not used (no yield) doesn't compile block if it's not used (no yield) - does dispatch on one argument does dispatch on one argument - passes self as pointer when doing multidispatch (2) passes self as pointer when doing multidispatch (2) - does dispatch on one argument inside module with explicit receiver does dispatch on one argument inside module with explicit receiver - does dispatch on virtual type does dispatch on virtual type - does dispatch on one argument inside module with implicit self does dispatch on one argument inside module with implicit self - does dispatch on receiver type does dispatch on receiver type - does multidispatch on virtual metaclass type (2) does multidispatch on virtual metaclass type (2) - casts multidispatch argument to the def's arg type casts multidispatch argument to the def's arg type - does dispatch on one argument with block does dispatch on one argument with block - initialize multidispatch initialize multidispatch - does multidispatch on virtual metaclass type (1) does multidispatch on virtual metaclass type (1) - does multidispatch with captured block (#12217) does multidispatch with captured block (#12217) - does dispatch on receiver type and argument type does dispatch on receiver type and argument type - passes self as pointer when doing multidispatch passes self as pointer when doing multidispatch - does dispatch on one argument with struct receiver, and modifies it does dispatch on one argument with struct receiver, and modifies it - downcasts self from union to struct (pass pointer to self) downcasts self from union to struct (pass pointer to self) -Semantic: module - can restrict module with module (#3029) can restrict module with module (#3029) - includes generic module with self (check return type, error) includes generic module with self (check return type, error) - finds class method in block finds class method in block - errors when extending generic module that defines instance vars (2) errors when extending generic module that defines instance vars (2) - allows overloading with included generic module allows overloading with included generic module - types proc of module after type changes types proc of module after type changes - includes generic module and errors in call includes generic module and errors in call - types proc of module with generic class types proc of module with generic class - finds in module when included finds in module when included - works ok in a case where a typed-def type has an underlying type that has an included generic module (bug) works ok in a case where a typed-def type has an underlying type that has an included generic module (bug) - includes module with Union(T*) includes module with Union(T*) - type def does not reopen type from parent namespace (#11181) type def does not reopen type from parent namespace (#11181) - uses type declaration inside module and gives error uses type declaration inside module and gives error - can't reopen as class can't reopen as class - uses type declaration inside module, recursive, and gives error uses type declaration inside module, recursive, and gives error - instantiates generic variadic module, accesses T from class method through generic extend instantiates generic variadic module, accesses T from class method through generic extend - gives error when trying to instantiate with allocate gives error when trying to instantiate with allocate - uses type declaration inside module uses type declaration inside module - uses :Module name for modules in errors uses :Module name for modules in errors - extends generic module from generic module and calls class method (#7167) extends generic module from generic module and calls class method (#7167) - calls super on included generic module and finds type var calls super on included generic module and finds type var - inherits instance var type annotation from generic to concrete inherits instance var type annotation from generic to concrete - gives error when including self gives error when including self - finds nested type inside method in block inside module finds nested type inside method in block inside module - errors when recursively extending module that defines instance vars errors when recursively extending module that defines instance vars - types pointer of module with generic type types pointer of module with generic type - gives error when including instantiation of self, generic module gives error when including instantiation of self, generic module - gives error with cyclic include gives error with cyclic include - gives error when including self, generic module gives error when including self, generic module - types pointer of module with generic type types pointer of module with generic type - declares module automatically if not previously declared when declaring a module declares module automatically if not previously declared when declaring a module - includes module in a module includes module in a module - can use generic module as instance variable type (2) can use generic module as instance variable type (2) - includes module but can't access metaclass methods includes module but can't access metaclass methods - errors when extending module that defines instance vars (#4065) errors when extending module that defines instance vars (#4065) - includes generic module with another generic type includes generic module with another generic type - includes generic module with self (check return subclass type, error) includes generic module with self (check return subclass type, error) - gives error with cyclic include between non-generic and generic module gives error with cyclic include between non-generic and generic module - instantiates generic variadic module, accesses T from instance method, more args instantiates generic variadic module, accesses T from instance method, more args - includes generic module with self includes generic module with self - gives helpful error message when generic type var is missing gives helpful error message when generic type var is missing - includes generic module with self (check return subclass type, success) includes generic module with self (check return subclass type, success) - extends a module extends a module - reports can't use instance variables inside module reports can't use instance variables inside module - initializes variable in module initializes variable in module - includes generic module explicitly and errors includes generic module explicitly and errors - errors when extending generic module that defines instance vars errors when extending generic module that defines instance vars - errors if reopening non-generic module as generic errors if reopening non-generic module as generic - includes generic module with self (check return type, success) includes generic module with self (check return type, success) - inherits instance var type annotation from generic to concrete with T inherits instance var type annotation from generic to concrete with T - doesn't look up initialize past module that defines initialize (#7007) doesn't look up initialize past module that defines initialize (#7007) - extends module from generic class and calls class method (#7167) extends module from generic class and calls class method (#7167) - includes module in a class includes module in a class - gives error when trying to instantiate with new gives error when trying to instantiate with new - correctly types type var in included module, with a restriction with a free var (bug) correctly types type var in included module, with a restriction with a free var (bug) - types pointer of module with method types pointer of module with method - initializes variable in module, recursive initializes variable in module, recursive - extends generic module from generic class and calls class method (#7167) extends generic module from generic class and calls class method (#7167) - doesn't lookup type in ancestor when matches in current type (#2982) doesn't lookup type in ancestor when matches in current type (#2982) - includes generic module with self (check argument type, success) includes generic module with self (check argument type, success) - gives helpful error message when generic type var is missing in block spec gives helpful error message when generic type var is missing in block spec - can instantiate generic module can instantiate generic module - calls super on included generic module calls super on included generic module - can't reopen as struct can't reopen as struct - errors if reopening generic module with different type vars errors if reopening generic module with different type vars - includes generic module with type includes generic module with type - declares module automatically if not previously declared when declaring a class declares module automatically if not previously declared when declaring a class - instantiates generic variadic module, accesses T from instance method instantiates generic variadic module, accesses T from instance method - errors if declares module inside if errors if declares module inside if - instantiates generic variadic module, accesses T from class method instantiates generic variadic module, accesses T from class method - errors if reopening generic module with different splat index (3) errors if reopening generic module with different splat index (3) - includes generic module with self (check argument superclass type, success) includes generic module with self (check argument superclass type, success) - gives error with cyclic include, generic module gives error with cyclic include, generic module - types union of module and class that includes it types union of module and class that includes it - works with range and map works with range and map - gives error with cyclic include between non-generic and generic module (2) gives error with cyclic include between non-generic and generic module (2) - errors if reopening generic module with different splat index errors if reopening generic module with different splat index - instantiates generic variadic module, accesses T from instance method through generic include, more args instantiates generic variadic module, accesses T from instance method through generic include, more args - includes module but wrong number of arguments includes module but wrong number of arguments - can't pass module class to virtual metaclass (#6113) can't pass module class to virtual metaclass (#6113) - errors when extending self and self defines instance vars (#9568) errors when extending self and self defines instance vars (#9568) - finds inner class from inherited one (#476) finds inner class from inherited one (#476) - includes module but not generic includes module but not generic - errors when extending self and self defines instance vars (2) (#9568) errors when extending self and self defines instance vars (2) (#9568) - errors if reopening generic module with different splat index (2) errors if reopening generic module with different splat index (2) - works with int including enumerable works with int including enumerable - includes generic module with self (check argument type, error) includes generic module with self (check argument type, error) - types pointer of module types pointer of module - includes generic module explicitly includes generic module explicitly - errors if reopening generic module with different type vars (2) errors if reopening generic module with different type vars (2) - inherits instance var type annotation from generic to generic to concrete inherits instance var type annotation from generic to generic to concrete - errors when extending module that defines instance vars (2) (#4065) errors when extending module that defines instance vars (2) (#4065) - errors when extending self and self defines instance vars (3) (#9568) errors when extending self and self defines instance vars (3) (#9568) - finds constant in generic module included in another module finds constant in generic module included in another module - extends self extends self - errors if including generic module and not specifying type vars errors if including generic module and not specifying type vars - types pointer of module with method with two including types types pointer of module with method with two including types - calls super on included generic module and finds type var (2) calls super on included generic module and finds type var (2) - can use generic module as instance variable type can use generic module as instance variable type - includes generic module with self (check argument superclass type, success) includes generic module with self (check argument superclass type, success) - errors when recursively extending module that defines instance vars (2) errors when recursively extending module that defines instance vars (2) - finds types close to included module finds types close to included module - includes generic module with self, and inherits it includes generic module with self, and inherits it - instantiates generic variadic module, accesses T from instance method through generic include instantiates generic variadic module, accesses T from instance method through generic include - includes but not a module includes but not a module -Crystal::Repl::Interpreter - downcasts virtual type to its only type (#12351) downcasts virtual type to its only type (#12351) - inlines instance var access from virtual type with a single type (#39520) inlines instance var access from virtual type with a single type (#39520) - classes - calls implicit struct self method calls implicit struct self method - does object_id does object_id - calls explicit struct self method calls explicit struct self method - interprets read instance var interprets read instance var - does allocate, set instance var and get instance var does allocate, set instance var and get instance var - does constructor does constructor - discards allocate discards allocate - calls implicit class self method calls implicit class self method -Codegen: responds_to? - doesn't error if result is discarded (#14113) doesn't error if result is discarded (#14113) - does for generic instance type metaclass (#4353) does for generic instance type metaclass (#4353) - codegens responds_to? with nilable gives false because other type 2 codegens responds_to? with nilable gives false because other type 2 - works with virtual class type (2) (#1926) works with virtual class type (2) (#1926) - works with generic virtual superclass (1) works with generic virtual superclass (1) - codegens responds_to? with generic class (2) codegens responds_to? with generic class (2) - codegens responds_to? with nilable gives true codegens responds_to? with nilable gives true - works with generic virtual superclass (2) works with generic virtual superclass (2) - codegens responds_to? with union gives true codegens responds_to? with union gives true - codegens responds_to? true for simple type codegens responds_to? true for simple type - works with virtual class type (1) (#1926) works with virtual class type (1) (#1926) - works with two virtual types works with two virtual types - works with module works with module - codegens responds_to? with nilable gives false because other type 1 codegens responds_to? with nilable gives false because other type 1 - works with generic virtual module (1) works with generic virtual module (1) - codegens responds_to? with generic class (1) codegens responds_to? with generic class (1) - works with generic virtual module (2) (#8334) works with generic virtual module (2) (#8334) - codegens responds_to? false for simple type codegens responds_to? false for simple type - codegens responds_to? with union gives false codegens responds_to? with union gives false - works with virtual type works with virtual type -Crystal::Command::FlagsVisitor - unique flags unique flags - different flags different flags - only macro only macro -Semantic: concrete_types - GenericModuleInstanceType GenericModuleInstanceType - VirtualType with concrete base VirtualType with concrete base - ModuleType ModuleType - VirtualMetaclassType with concrete base VirtualMetaclassType with concrete base - VirtualType with abstract base VirtualType with abstract base - VirtualMetaclassType with abstract base VirtualMetaclassType with abstract base - UnionType of structs UnionType of structs -Code gen: virtual type - codegens new for virtual class with one type codegens new for virtual class with one type codegens new for virtual class with one type codegens new for virtual class with one type codegens new for virtual class with one type codegens new for virtual class with one type codegens new for virtual class with one type codegens new for virtual class with one type codegens new for virtual class with one type codegens new for virtual class with one type - casts virtual type to union casts virtual type to union - call overwritten method call overwritten method - call base overwritten method call base overwritten method - casts virtual type to base virtual type casts virtual type to base virtual type - codegens virtual call with explicit self codegens virtual call with explicit self - codegens virtual call with explicit self and nilable type codegens virtual call with explicit self and nilable type - dispatch call with virtual type argument dispatch call with virtual type argument - initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated initializes ivars to nil even if object never instantiated - returns type with virtual type def type returns type with virtual type def type - can belong to union can belong to union - dispatch call with nilable virtual arg dispatch call with nilable virtual arg - codegens non-virtual call that calls virtual call to another virtual call codegens non-virtual call that calls virtual call to another virtual call - assign instance variable in virtual type assign instance variable in virtual type - codegens new for virtual class with two types codegens new for virtual class with two types codegens new for virtual class with two types codegens new for virtual class with two types codegens new for virtual class with two types codegens new for virtual class with two types codegens new for virtual class with two types codegens new for virtual class with two types codegens new for virtual class with two types codegens new for virtual class with two types - correctly dispatch call with block when the obj is a virtual type correctly dispatch call with block when the obj is a virtual type - codegens new for simple type, then for virtual codegens new for simple type, then for virtual - casts union to virtual casts union to virtual - dispatches on virtual metaclass (1) dispatches on virtual metaclass (1) - codegens virtual method of abstract metaclass codegens virtual method of abstract metaclass - codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type codegens call to Object#to_s from virtual type - calls class method 3 calls class method 3 - calls class method 1 calls class method 1 - codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type codegens call to Object#to_s from nilable type - call base method call base method - doesn't lookup in Value+ when virtual type is Object+ doesn't lookup in Value+ when virtual type is Object+ - codegens allocate for virtual type with custom new codegens allocate for virtual type with custom new - calls class method 2 calls class method 2 - codegens new twice for virtual codegens new twice for virtual - dispatches on virtual metaclass (3) dispatches on virtual metaclass (3) - codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) codegens new for new on virtual abstract class (#3835) - dispatches on virtual metaclass (2) dispatches on virtual metaclass (2) - casts metaclass union type to virtual metaclass type (#6298) casts metaclass union type to virtual metaclass type (#6298) - lookup instance variables in parent types lookup instance variables in parent types -Lexer doc - lexes with doc enabled and docs lexes with doc enabled and docs - lexes with doc enabled but without docs lexes with doc enabled but without docs - resets doc after non newline or space token resets doc after non newline or space token - lexes with doc enabled and docs, one line comment with two newlines and another comment lexes with doc enabled and docs, one line comment with two newlines and another comment - lexes with doc enabled and docs, two line comment lexes with doc enabled and docs, two line comment - lexes with doc enabled and docs, two line comment with leading whitespace lexes with doc enabled and docs, two line comment with leading whitespace - lexes without doc enabled lexes without doc enabled -Semantic: static array - doesn't match other number type argument of static array (#1203) doesn't match other number type argument of static array (#1203) - can match number type argument of static array (#1203) can match number type argument of static array (#1203) - types static array with var declaration types static array with var declaration - types static array new with size being a constant types static array new with size being a constant - can match N type argument of static array (#1203) can match N type argument of static array (#1203) - doesn't crash on instance_sizeof (#8858) doesn't crash on instance_sizeof (#8858) - types static array new types static array new - types static array new with size being a computed constant types static array new with size being a computed constant - errors on negative static array size errors on negative static array size - types static array new with size being a computed constant, and use N (bug) types static array new with size being a computed constant, and use N (bug) - doesn't crash on restriction (#584) doesn't crash on restriction (#584) - allows instantiating static array instance var in initialize of generic type allows instantiating static array instance var in initialize of generic type - doesn't crash on offsetof (#8858) doesn't crash on offsetof (#8858) - errors if trying to instantiate static array with N not an integer errors if trying to instantiate static array with N not an integer - types static array with type as size types static array with type as size - doesn't crash on sizeof (#8858) doesn't crash on sizeof (#8858) - types static array new with size being a nested constant inside type declaration (#5426) types static array new with size being a nested constant inside type declaration (#5426) -Semantic: sizeof - gives error if using instance_sizeof on a metaclass gives error if using instance_sizeof on a metaclass - types alignof types alignof - types alignof NoReturn (missing type) (#5717) types alignof NoReturn (missing type) (#5717) - gives error if using instance_sizeof on an abstract struct with multiple subtypes (#11855) gives error if using instance_sizeof on an abstract struct with multiple subtypes (#11855) - gives error if using instance_sizeof on an abstract struct (#11855) gives error if using instance_sizeof on an abstract struct (#11855) - gives error if using instance_sizeof on a union type (#8349) gives error if using instance_sizeof on a union type (#8349) - types sizeof types sizeof - errors on sizeof uninstantiated generic type (#6415) errors on sizeof uninstantiated generic type (#6415) - gives error if using instance_sizeof on something that's not a class gives error if using instance_sizeof on something that's not a class - types instance_sizeof NoReturn (missing type) (#5717) types instance_sizeof NoReturn (missing type) (#5717) - gives error if using instance_sizeof on a struct gives error if using instance_sizeof on a struct - types instance_sizeof types instance_sizeof - types instance_alignof types instance_alignof - types instance_alignof NoReturn (missing type) (#5717) types instance_alignof NoReturn (missing type) (#5717) - gives error if using instance_sizeof on a generic type without type vars gives error if using instance_sizeof on a generic type without type vars - types sizeof NoReturn (missing type) (#5717) types sizeof NoReturn (missing type) (#5717) - gives error if using instance_sizeof on a module gives error if using instance_sizeof on a module -Code gen: def - doesn't crash on private def as last expression doesn't crash on private def as last expression - codegens call without args codegens call without args - codegens return nil when nilable type (1) codegens return nil when nilable type (1) - uses dispatch call type for phi (#3529) uses dispatch call type for phi (#3529) - codegens dispatch with nilable reference union type codegens dispatch with nilable reference union type - uses previous argument in default value (#1062) uses previous argument in default value (#1062) - codegens dispatch on static method codegens dispatch on static method - codegens recursive nasty code codegens recursive nasty code - codegens union to union assignment of mutable arg (#3691) codegens union to union assignment of mutable arg (#3691) - codegens call with args codegens call with args - codegens return nil when nilable type (2) codegens return nil when nilable type (2) - unifies all calls to same def unifies all calls to same def unifies all calls to same def unifies all calls to same def unifies all calls to same def unifies all calls to same def unifies all calls to same def unifies all calls to same def unifies all calls to same def unifies all calls to same def - codegens with interesting default argument codegens with interesting default argument - codegens with and without many default arguments codegens with and without many default arguments - use target def type as return type use target def type as return type use target def type as return type use target def type as return type use target def type as return type use target def type as return type use target def type as return type use target def type as return type use target def type as return type use target def type as return type - dispatches on virtual type implementing generic module (related to bug #165) dispatches on virtual type implementing generic module (related to bug #165) - codegens empty def codegens empty def - codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation codegens and doesn't break if obj is int and there's a mutation - uses var after external uses var after external - allows to change argument values allows to change argument values - codegens yield with destructing tuple having unreachable element codegens yield with destructing tuple having unreachable element - call functions defined in any order call functions defined in any order - codegens dispatch with single def when discarding unallocated ones (2) codegens dispatch with single def when discarding unallocated ones (2) - runs empty def runs empty def - codegens with and without default arguments codegens with and without default arguments - puts union before single type in matches preferences puts union before single type in matches preferences - codegens with related types codegens with related types - call external function 'putchar' call external function 'putchar' - codegens bug #119 codegens bug #119 codegens bug #119 codegens bug #119 codegens bug #119 codegens bug #119 codegens bug #119 codegens bug #119 codegens bug #119 codegens bug #119 - uses self uses self - looks up matches in super classes and merges them with subclasses looks up matches in super classes and merges them with subclasses - codegens dispatch without obj, bug 1 codegens dispatch without obj, bug 1 - codegens def which changes type of arg codegens def which changes type of arg - can match N type argument of static array (#1203) can match N type argument of static array (#1203) - codegens dispatch with single def when discarding unallocated ones (1) codegens dispatch with single def when discarding unallocated ones (1) - builds infinite recursive function builds infinite recursive function - fixes #230: include original owner in mangled def fixes #230: include original owner in mangled def - codegens recursive type with union codegens recursive type with union - codegens dispatch without obj, bug 1 codegens dispatch without obj, bug 1 -Call errors - says type mismatch for positional argument even if there are overloads that don't match says type mismatch for positional argument even if there are overloads that don't match - says no parameter named says no parameter named - says not expected to be invoked with a block says not expected to be invoked with a block - errors on argument if more types are given than expected errors on argument if more types are given than expected - says missing named argument says missing named argument - says argument already specified says argument already specified - says wrong number of arguments (to few arguments) says wrong number of arguments (to few arguments) - says type mismatch for positional argument with three options says type mismatch for positional argument with three options - says type mismatch for symbol against enum, named argument case says type mismatch for symbol against enum, named argument case - replaces generic type var in positional argument replaces generic type var in positional argument - replaces free variables in named argument replaces free variables in named argument - errors on argument if argument matches in all overloads but with different types in other arguments errors on argument if argument matches in all overloads but with different types in other arguments - method signatures in error traces - expands positional and single splat argument, empty tuple expands positional and single splat argument, empty tuple - expands double splat argument, more elements expands double splat argument, more elements - expands positional and single splat argument expands positional and single splat argument - expands single splat argument, more elements expands single splat argument, more elements - includes named arguments includes named arguments - expands single splat argument, empty tuple expands single splat argument, empty tuple - expands positional and double splat argument, empty named tuple expands positional and double splat argument, empty named tuple - uses `T.method` instead of `T:module#method` uses `T.method` instead of `T:module#method` - expands double splat argument expands double splat argument - expands single splat argument expands single splat argument - includes named argument includes named argument - uses `T.method` instead of `T.class#method` uses `T.method` instead of `T.class#method` - expands double splat argument, empty named tuple expands double splat argument, empty named tuple - expands positional and double splat argument expands positional and double splat argument - expands positional and single splat argument, more elements expands positional and single splat argument, more elements - includes positional and named argument includes positional and named argument - expands positional and double splat argument, more elements expands positional and double splat argument, more elements - says type mismatch for positional argument says type mismatch for positional argument - says type mismatch for positional argument with two options says type mismatch for positional argument with two options - errors on argument if more types are given than expected, shows all expected types errors on argument if more types are given than expected, shows all expected types - says expected to be invoked with a block says expected to be invoked with a block - says missing named arguments says missing named arguments - says wrong number of arguments even if other overloads don't match by block says wrong number of arguments even if other overloads don't match by block - says no parameters named says no parameters named - says type mismatch for symbol against enum (did you mean) says type mismatch for symbol against enum (did you mean) - says type mismatch for named argument says type mismatch for named argument - replaces generic type var in named argument replaces generic type var in named argument - replaces free variables in positional argument replaces free variables in positional argument - says type mismatch for symbol against enum (list all possibilities when 10 or less) says type mismatch for symbol against enum (list all possibilities when 10 or less) -Crystal::Doc::Macro - args_to_s - shows external name of arg with quotes and escaping shows external name of arg with quotes and escaping - shows simple arg and double splat arg shows simple arg and double splat arg - shows splat arg shows splat arg - shows double splat arg shows double splat arg - shows double splat arg shows double splat arg - shows default value with highlighting shows default value with highlighting - shows external name of arg shows external name of arg - shows simple args shows simple args - shows simple arg and splat arg shows simple arg and splat arg - shows block arg shows block arg - shows simple arg and block arg shows simple arg and block arg -Crystal::Init::InitProject - has proper contents has proper contents - correctly uses git config correctly uses git config -Code gen: block - return from yielder function (2) return from yielder function (2) - codegens dispatch with block and break (1) codegens dispatch with block and break (1) codegens dispatch with block and break (1) codegens dispatch with block and break (1) codegens dispatch with block and break (1) codegens dispatch with block and break (1) codegens dispatch with block and break (1) codegens dispatch with block and break (1) codegens dispatch with block and break (1) codegens dispatch with block and break (1) - allows access to local variables allows access to local variables - executes yield expression if no arg is given for block executes yield expression if no arg is given for block - call block from dispatch and use local vars call block from dispatch and use local vars call block from dispatch and use local vars call block from dispatch and use local vars call block from dispatch and use local vars call block from dispatch and use local vars call block from dispatch and use local vars call block from dispatch and use local vars call block from dispatch and use local vars call block from dispatch and use local vars - allows modifying yielded value (with literal) allows modifying yielded value (with literal) - assigns yield to argument assigns yield to argument - pass self and arguments to yielder function pass self and arguments to yielder function - codegens dispatch with block and break (2) codegens dispatch with block and break (2) codegens dispatch with block and break (2) codegens dispatch with block and break (2) codegens dispatch with block and break (2) codegens dispatch with block and break (2) codegens dispatch with block and break (2) codegens dispatch with block and break (2) codegens dispatch with block and break (2) codegens dispatch with block and break (2) - codegens bug with block and arg and var codegens bug with block and arg and var - yields inside yield (#682) yields inside yield (#682) - can set instance vars from yielder function can set instance vars from yielder function - returns from proc literal returns from proc literal - codegens nested return codegens nested return - can use instance methods from yielder function can use instance methods from yielder function - can use global constant can use global constant - codegens block with repeated underscore and different types (#4711) codegens block with repeated underscore and different types (#4711) - generate inline generate inline - codegens block with nilable type with return (1) codegens block with nilable type with return (1) - codegens if with call with block (ssa issue) codegens if with call with block (ssa issue) - allows yield from dispatch call allows yield from dispatch call - return from block that always returns from function that conditionally yields return from block that always returns from function that conditionally yields - codegens block call when argument type changes codegens block call when argument type changes - codegens block which always breaks but never enters (#494) codegens block which always breaks but never enters (#494) - breaks in var assignment (#3364) breaks in var assignment (#3364) - doesn't codegen after while that always yields and breaks doesn't codegen after while that always yields and breaks - codegens nested break codegens nested break - uses block splat argument with union types uses block splat argument with union types - works if block has both splat parameter and multiple non-splat underscore parameters works if block has both splat parameter and multiple non-splat underscore parameters - break from block with value break from block with value - doesn't crash on yield exp without a type (#8100) doesn't crash on yield exp without a type (#8100) - nested yields nested yields - returns from block with value returns from block with value returns from block with value returns from block with value returns from block with value returns from block with value returns from block with value returns from block with value returns from block with value returns from block with value - doesn't crash if yield exp has no type (#12670) doesn't crash if yield exp has no type (#12670) - return from block called from dispatch return from block called from dispatch - (bug) doesn't set needs_value to true on every yield (#12442) (bug) doesn't set needs_value to true on every yield (#12442) - allows initialize with yield (#224) allows initialize with yield (#224) - codegens block with virtual type arg codegens block with virtual type arg - codegens block with nilable type with return (2) codegens block with nilable type with return (2) - allows modifying yielded value (with variable) allows modifying yielded value (with variable) - can use self inside a block called from dispatch can use self inside a block called from dispatch - codegens block with multiple underscores (#3054) codegens block with multiple underscores (#3054) - codegens block with return and yield and no return codegens block with return and yield and no return - codegens block with union with return codegens block with union with return - break with value from yielder that returns a nilable break with value from yielder that returns a nilable - uses block var with same name as local var uses block var with same name as local var - uses block inside array literal (bug) uses block inside array literal (bug) uses block inside array literal (bug) uses block inside array literal (bug) uses block inside array literal (bug) uses block inside array literal (bug) uses block inside array literal (bug) uses block inside array literal (bug) uses block inside array literal (bug) uses block inside array literal (bug) - codegens block bug with conditional next and unconditional break (4) codegens block bug with conditional next and unconditional break (4) - passes yield arguments passes yield arguments - doesn't codegen call if arg yields and always breaks doesn't codegen call if arg yields and always breaks - can access instance vars from yielder function can access instance vars from yielder function - codegens call with blocks of different type without args codegens call with blocks of different type without args - break without value returns nil break without value returns nil - can call methods from block when yielder is an instance method can call methods from block when yielder is an instance method - codegens block bug with conditional next and unconditional break (2) codegens block bug with conditional next and unconditional break (2) - breaks from while in function called from block breaks from while in function called from block - return from yielder function return from yielder function - pass arguments to yielder function pass arguments to yielder function - codegens captured block that returns union, but proc only returns a single type codegens captured block that returns union, but proc only returns a single type - codegens method invocation on a object of a captured block with a type that was never instantiated codegens method invocation on a object of a captured block with a type that was never instantiated - dispatches with captured and non-captured block (#3969) dispatches with captured and non-captured block (#3969) - nexts in var assignment (#3364) nexts in var assignment (#3364) - unpacks tuple but doesn't override local variables unpacks tuple but doesn't override local variables - codegens bug with yield not_nil! that is never not nil codegens bug with yield not_nil! that is never not nil - codegens method invocation on a object of a captured block with a type that was never instantiated (2) codegens method invocation on a object of a captured block with a type that was never instantiated (2) - codegens captured block with next inside yielded block (#2097) codegens captured block with next inside yielded block (#2097) - codegens call with block with call with arg that yields codegens call with block with call with arg that yields - codegens block bug with conditional next and unconditional break (3) codegens block bug with conditional next and unconditional break (3) - pass self to yielder function pass self to yielder function - union value of yielder function union value of yielder function - call block from dispatch call block from dispatch - auto-unpacks tuple auto-unpacks tuple - codegens block with union arg (1) codegens block with union arg (1) - allows using var as block arg with outer var allows using var as block arg with outer var - uses splat in block argument, many args uses splat in block argument, many args - break from block with value break from block with value break from block with value break from block with value break from block with value break from block with value break from block with value break from block with value break from block with value break from block with value - returns void when called with block returns void when called with block - doesn't crash on untyped array to_s doesn't crash on untyped array to_s doesn't crash on untyped array to_s doesn't crash on untyped array to_s doesn't crash on untyped array to_s doesn't crash on untyped array to_s doesn't crash on untyped array to_s doesn't crash on untyped array to_s doesn't crash on untyped array to_s doesn't crash on untyped array to_s - codegens block bug with conditional next and unconditional break (1) codegens block bug with conditional next and unconditional break (1) - can break without value from yielder that returns nilable (2) can break without value from yielder that returns nilable (2) - does next from captured block does next from captured block - - codegens while/break inside block codegens while/break inside block - break block with yielder inside while break block with yielder inside while break block with yielder inside while break block with yielder inside while break block with yielder inside while break block with yielder inside while break block with yielder inside while break block with yielder inside while break block with yielder inside while break block with yielder inside while - break from block returns from yielder break from block returns from yielder - uses splat in block argument uses splat in block argument - block with nilable type block with nilable type - works if block has both splat and non-splat underscore parameters works if block has both splat and non-splat underscore parameters - it yields nil from another call it yields nil from another call - clears nilable var before inlining block method (#10087) clears nilable var before inlining block method (#10087) - allow return from function called from yielder function allow return from function called from yielder function - codegens block with union arg (2) codegens block with union arg (2) - can break without value from yielder that returns nilable (1) can break without value from yielder that returns nilable (1) - block with nilable type 2 block with nilable type 2 - yields splat yields splat - return from block that always returns from function that always yields inside if block return from block that always returns from function that always yields inside if block - return from block return from block - yields more exps than block arg, through splat yields more exps than block arg, through splat -Crystal::Playground::AgentInstrumentorTransformer - instrument multi assignments in the rhs instrument multi assignments in the rhs - instrument binary expressions instrument binary expressions - do not instrument top level macro calls do not instrument top level macro calls - instrument single variables expressions instrument single variables expressions - instrument unary expressions instrument unary expressions - instrument blocks and but non multi yields instrument blocks and but non multi yields - instrument typeof instrument typeof - instrument if statement instrument if statement - instrument literals with expression names instrument literals with expression names - instrument string interpolations instrument string interpolations - instrument literals instrument literals - instrument nested blocks unless in same line instrument nested blocks unless in same line - instrument while statement instrument while statement - instrument returns inside def instrument returns inside def - instrument class defs instrument class defs - do not instrument class initializing arguments do not instrument class initializing arguments - instrument case statement instrument case statement - instrument inside modules instrument inside modules - do not instrument class/module declared macro do not instrument class/module declared macro - instrument single statement def instrument single statement def - instrument is_a? expressions instrument is_a? expressions - instrument print with args instrument print with args - instrument instance variable and class variables reads and writes instrument instance variable and class variables reads and writes - instrument ivar with obj instrument ivar with obj - instrument nested class defs instrument nested class defs - instrument assignments in the rhs instrument assignments in the rhs - do not instrument records class do not instrument records class - instrument blocks and single yields instrument blocks and single yields - instrument multi statement def instrument multi statement def - do not instrument macro calls in class do not instrument macro calls in class - instrument single statement var def instrument single statement var def - instrument unless statement instrument unless statement - allow visibility modifiers allow visibility modifiers - do not instrument constants assignments do not instrument constants assignments - instrument chained comparisons (#4663) instrument chained comparisons (#4663) - instrument puts with args instrument puts with args - instrument exceptions instrument exceptions - instrument not expressions instrument not expressions -Semantic: initialize - types instance var as nilable if assigned in block types instance var as nilable if assigned in block - doesn't type instance var as nilable if not used in method call doesn't type instance var as nilable if not used in method call - marks instance variable as nilable in initialize if assigning self marks instance variable as nilable in initialize if assigning self - types instance var as nilable if not always assigned types instance var as nilable if not always assigned - errors if found matches for initialize but doesn't cover all (bug #204) errors if found matches for initialize but doesn't cover all (bug #204) - types initializer of recursive generic type types initializer of recursive generic type - errors on default new when using named arguments (#2245) errors on default new when using named arguments (#2245) - types instance var as nilable if used after method call that reads var through other calls types instance var as nilable if used after method call that reads var through other calls - doesn't type instance var as nilable if used after method call inside typeof doesn't type instance var as nilable if used after method call inside typeof - types instance var as non-nilable if calls super and super defines it types instance var as non-nilable if calls super and super defines it - marks instance variable as nilable when using self in super marks instance variable as nilable when using self in super - types instance var as not-nilable if assigned in block but previously assigned types instance var as not-nilable if assigned in block but previously assigned - types instance var as nilable if used before assignment types instance var as nilable if used before assignment - doesn't type ivar as nilable if super call present and parent has already typed ivar (#4764) doesn't type ivar as nilable if super call present and parent has already typed ivar (#4764) - checks instance vars of included modules checks instance vars of included modules - types instance var as nilable if used after method call that reads var types instance var as nilable if used after method call that reads var - doesn't type instance var as nilable if used after method call that assigns var doesn't type instance var as nilable if used after method call that assigns var - marks instance variable as nilable in initialize if using self in method marks instance variable as nilable in initialize if using self in method - doesn't type ivar having initializer as nilable even if it is used before assigned inside initialize (#5112) doesn't type ivar having initializer as nilable even if it is used before assigned inside initialize (#5112) - types instance var as non-nilable if calls super and super defines it, with one level of indirection types instance var as non-nilable if calls super and super defines it, with one level of indirection - doesn't type instance var as nilable if assigned before method call doesn't type instance var as nilable if assigned before method call - marks instance variable as nilable in initialize if using self marks instance variable as nilable in initialize if using self - doesn't mark instance variable as nilable when using self.class doesn't mark instance variable as nilable when using self.class - doesn't type instance var as nilable if used after method call that doesn't read var doesn't type instance var as nilable if used after method call that doesn't read var - doesn't type instance var as nilable if used after global method call doesn't type instance var as nilable if used after global method call - types instance vars as nilable if doesn't invoke super in initialize with deep subclass types instance vars as nilable if doesn't invoke super in initialize with deep subclass - doesn't type instance var as nilable if out doesn't type instance var as nilable if out - doesn't mark instance variable as nilable when using self.class in method doesn't mark instance variable as nilable when using self.class in method - types instance vars as nilable if doesn't invoke super with default arguments types instance vars as nilable if doesn't invoke super with default arguments - finishes when analyzing recursive calls finishes when analyzing recursive calls - types initializer of generic type after instantiated types initializer of generic type after instantiated - types instance var as nilable if used in first of two method calls types instance var as nilable if used in first of two method calls - types instance vars as nilable if doesn't invoke super in initialize types instance vars as nilable if doesn't invoke super in initialize - types instance var as nilable if used after method call that reads var (2) types instance var as nilable if used after method call that reads var (2) -Codegen: thread local - compiles with class variable referenced from initializer compiles with class variable referenced from initializer compiles with class variable referenced from initializer compiles with class variable referenced from initializer compiles with class variable referenced from initializer compiles with class variable referenced from initializer compiles with class variable referenced from initializer compiles with class variable referenced from initializer compiles with class variable referenced from initializer compiles with class variable referenced from initializer - works with class variable in main thread works with class variable in main thread works with class variable in main thread works with class variable in main thread works with class variable in main thread works with class variable in main thread works with class variable in main thread works with class variable in main thread works with class variable in main thread works with class variable in main thread - works with class variables works with class variables works with class variables works with class variables works with class variables works with class variables works with class variables works with class variables works with class variables works with class variables -Normalize: case - normalizes case with many expressions in when normalizes case with many expressions in when - normalizes case with implicit ! normalizes case with implicit ! - normalizes case without value with many expressions in when normalizes case without value with many expressions in when - normalizes case with Path.class to is_a? normalizes case with Path.class to is_a? - normalizes case without when but else normalizes case without when but else - normalizes case with implicit is_a? (#3040) normalizes case with implicit is_a? (#3040) - normalizes case with Path to is_a? normalizes case with Path to is_a? - normalizes case with multiple expressions with all underscores twice normalizes case with multiple expressions with all underscores twice - normalizes case with call normalizes case with call - normalizes case with implicit as? (#3040) normalizes case with implicit as? (#3040) - normalizes case with multiple expressions with underscore normalizes case with multiple expressions with underscore - normalizes case with var in cond normalizes case with var in cond - normalizes case without when and else normalizes case without when and else - normalizes case without cond, when but else normalizes case without cond, when but else - normalizes case with nil to is_a? normalizes case with nil to is_a? - normalizes case with implicit call normalizes case with implicit call - normalizes case with implicit as (#3040) normalizes case with implicit as (#3040) - normalizes case with multiple expressions normalizes case with multiple expressions - normalizes case with multiple expressions with all underscores normalizes case with multiple expressions with all underscores - normalizes case with multiple expressions and non-tuple normalizes case with multiple expressions and non-tuple - normalizes case without cond, when and else normalizes case without cond, when and else - normalizes case with Generic.class to is_a? normalizes case with Generic.class to is_a? - normalizes case with multiple expressions and comma normalizes case with multiple expressions and comma - normalizes case with assignment wrapped by paren normalizes case with assignment wrapped by paren - normalizes case without value normalizes case without value - normalizes case with implicit responds_to? (#3040) normalizes case with implicit responds_to? (#3040) - normalizes case with multiple expressions and implicit obj normalizes case with multiple expressions and implicit obj - normalizes case with multiple expressions and types normalizes case with multiple expressions and types - normalizes case with Path.class to is_a? (in) normalizes case with Path.class to is_a? (in) - normalizes case with generic to is_a? normalizes case with generic to is_a? - normalizes case with assignment normalizes case with assignment -Crystal::Command - clear_cache - clears any cached compiler files clears any cached compiler files -Crystal::ABI::X86_64 - abi_info - does with structs less than 64 bits does with structs less than 64 bits - does with structs larger than 128 bits does with structs larger than 128 bits - does with structs between 64 and 128 bits does with structs between 64 and 128 bits - does with primitives does with primitives - align - for packed struct for packed struct - for double for double - for float for float - for pointer for pointer - for array for array - for integer for integer - for struct for struct - size - for integer for integer - for array for array - for double for double - for float for float - for pointer for pointer - for struct for struct - for packed struct for packed struct -Code gen: def with default value - doesn't mix types of instance vars with initialize and new doesn't mix types of instance vars with initialize and new - considers first the one with a restriction considers first the one with a restriction - codegens def new with one default value codegens def new with one default value - considers first the one with more arguments considers first the one with more arguments - resolves expanded call to current type, not to virtual type resolves expanded call to current type, not to virtual type - codegens def with one default value codegens def with one default value -Semantic: primitives - types an expression types an expression - allows @[Primitive] on method that has body allows @[Primitive] on method that has body - Reference.pre_initialize - errors on uninstantiated generic type errors on uninstantiated generic type - types with reference type types with reference type - types with virtual reference type types with virtual reference type - errors on abstract type errors on abstract type - types a float64 types a float64 - types a int64 types a int64 - can invoke binary on primitive typedef (2) (#614) can invoke binary on primitive typedef (2) (#614) - looks up return type in correct scope (#13652) looks up return type in correct scope (#13652) - types a string types a string - computes correct hash value type if it's a function literal (#320) computes correct hash value type if it's a function literal (#320) - correctly types first hash from type vars (bug) correctly types first hash from type vars (bug) - types a uint128 types a uint128 - types nop types nop - extends from Number and doesn't find to_i method extends from Number and doesn't find to_i method - Struct.pre_initialize - errors on abstract type errors on abstract type - errors on virtual abstract type errors on virtual abstract type - errors on abstract pointee type errors on abstract pointee type - errors if @[Primitive] has no args errors if @[Primitive] has no args - can invoke cast on primitive typedef (#614) can invoke cast on primitive typedef (#614) - extends from Number and doesn't find + method extends from Number and doesn't find + method - extends from Number and doesn't find >= method extends from Number and doesn't find >= method - Slice.literal - with element type - types primitive float literal types primitive float literal - types primitive int literal types primitive int literal - errors if element type is not primitive int or float errors if element type is not primitive int or float - errors if element is not number literal errors if element is not number literal - errors if element is out of range errors if element is out of range - types empty literal types empty literal - without element type - types primitive float literal types primitive float literal - types primitive int literal types primitive int literal - errors if element is not number literal errors if element is not number literal - errors if multiple element types are found errors if multiple element types are found - errors if empty errors if empty - types pointer of int types pointer of int - types 1 + 2 types 1 + 2 - types a int128 types a int128 - types a symbol types a symbol - can invoke binary on primitive typedef (#614) can invoke binary on primitive typedef (#614) - types va_arg primitive types va_arg primitive - types @[Primitive] method types @[Primitive] method - errors if using instance variable inside primitive type errors if using instance variable inside primitive type - types an int32 types an int32 - types nil types nil - types a bool types a bool - types a char types a char - types char ord types char ord - errors when comparing void (#225) errors when comparing void (#225) - types a float32 types a float32 - errors if @[Primitive] has non-symbol arg errors if @[Primitive] has non-symbol arg -Crystal::Loader - .read_ld_conf - basic basic - with include with include - .default_search_paths - DYLD_LIBRARY_PATH DYLD_LIBRARY_PATH - LD_LIBRARY_PATH LD_LIBRARY_PATH - .parse - prepends directory paths before default search paths prepends directory paths before default search paths - parses static parses static - parses library names parses library names - parses file paths parses file paths - parses directory paths parses directory paths - dynlib - #load_file? - finds function symbol finds function symbol - validate that lib handles are properly closed validate that lib handles are properly closed - does not find global symbols does not find global symbols - #load_library? - does not implicitly find dependencies does not implicitly find dependencies - library name library name - lookup in order lookup in order - full path full path -Semantic: exception - remains nilable after rescue remains nilable after rescue - can use next inside while inside ensure (#4470) can use next inside while inside ensure (#4470) - says syntax error on "begin; rescue ex; rescue ex : Foo; end; ex" says syntax error on "begin; rescue ex; rescue ex : Foo; end; ex" - can't return from ensure (#4470) can't return from ensure (#4470) - types instance variable as nilable if assigned inside an exception handler (#1845) types instance variable as nilable if assigned inside an exception handler (#1845) - can't use next inside while inside ensure (#4470) can't use next inside while inside ensure (#4470) - type is union of main and rescue blocks type is union of main and rescue blocks - doesn't type instance variable as nilable if assigned inside an exception handler after being assigned doesn't type instance variable as nilable if assigned inside an exception handler after being assigned - assigns var inside ensure (1) (#3919) assigns var inside ensure (1) (#3919) - errors if caught exception is a union but not all types are valid errors if caught exception is a union but not all types are valid - can't return from while inside ensure (#4470) can't return from while inside ensure (#4470) - types exception var with no types types exception var with no types - errors if caught exception is a nested union but not all types are valid errors if caught exception is a nested union but not all types are valid - transform nodes in else block transform nodes in else block - marks def as raises marks def as raises - types var assignment inside block inside exception handler (#3324) types var assignment inside block inside exception handler (#3324) - type for exception handler for explicit types type for exception handler for explicit types - says syntax error on "begin; rescue ex; rescue; end; ex" says syntax error on "begin; rescue ex; rescue; end; ex" - type union with empty main block type union with empty main block - types var as not nil if defined inside begin and defined inside rescue types var as not nil if defined inside begin and defined inside rescue - assigns var inside ensure (2) (#3919) assigns var inside ensure (2) (#3919) - errors if caught exception is not a subclass of Exception without var errors if caught exception is not a subclass of Exception without var - types a var after rescue as being nilable types a var after rescue as being nilable - types var as nilable if previously nilable (1) types var as nilable if previously nilable (1) - type union with empty rescue block type union with empty rescue block - types a var after begin rescue as having all possible types and nil in begin if read (2) types a var after begin rescue as having all possible types and nil in begin if read (2) - correctly types variable assigned inside nested exception handler (#9769) correctly types variable assigned inside nested exception handler (#9769) - can't use next inside block inside ensure (#4470) can't use next inside block inside ensure (#4470) - marks fun as raises marks fun as raises - types code with abstract exception that delegates method types code with abstract exception that delegates method - types var as nilable if previously nilable (2) types var as nilable if previously nilable (2) - can use next inside block inside ensure (#4470) can use next inside block inside ensure (#4470) - can't use break inside block inside ensure (#4470) can't use break inside block inside ensure (#4470) - types a var after begin rescue as having all possible types in begin and rescue types a var after begin rescue as having all possible types in begin and rescue - types a var after begin rescue with no-return in rescue types a var after begin rescue with no-return in rescue - types var as nilable inside ensure (1) types var as nilable inside ensure (1) - marks method calling lib fun that raises as raises marks method calling lib fun that raises as raises - marks proc literal as raises marks proc literal as raises - marks method that calls another method that raises as raises, recursively marks method that calls another method that raises as raises, recursively - doesn't consider vars as nilable inside else (#610) doesn't consider vars as nilable inside else (#610) - can use break inside block inside ensure (#4470) can use break inside block inside ensure (#4470) - can't use break inside while inside ensure (#4470) can't use break inside while inside ensure (#4470) - says syntax error on "begin; else; 1; end" says syntax error on "begin; else; 1; end" - detects reading nil-if-read variable after exception handler (#4723) detects reading nil-if-read variable after exception handler (#4723) - types a var after begin rescue as having all possible types in begin and rescue (2) types a var after begin rescue as having all possible types in begin and rescue (2) - gets a non-nilable type if all rescue are unreachable (#8751) gets a non-nilable type if all rescue are unreachable (#8751) - correctly types variables inside conditional inside exception handler with no-return rescue (#8012) correctly types variables inside conditional inside exception handler with no-return rescue (#8012) - doesn't infect type to variable before handler (#4002) doesn't infect type to variable before handler (#4002) - correctly types #1988 correctly types #1988 - shadows local variable (1) shadows local variable (1) - errors if caught exception is not a subclass of Exception errors if caught exception is not a subclass of Exception - marks method calling method that raises as raises marks method calling method that raises as raises - doesn't crash on break inside rescue, in while (#2441) doesn't crash on break inside rescue, in while (#2441) - types exception with type types exception with type - types var as nilable inside ensure (2) types var as nilable inside ensure (2) - can use break inside while inside ensure (#4470) can use break inside while inside ensure (#4470) - marks instance variable as nilable if assigned inside rescue inside initialize marks instance variable as nilable if assigned inside rescue inside initialize - can't return from block inside ensure (#4470) can't return from block inside ensure (#4470) -Crystal::Doc::Generator - #formatted_summary - with a Deprecated annotation, and no docs - should generate just the Deprecated tag should generate just the Deprecated tag - with a Experimental annotation, and no docs - should generate just the Experimental tag should generate just the Experimental tag - should exclude whitespace before the summary line should exclude whitespace before the summary line - with a Deprecated annotation, and docs - should generate both the docs and Deprecated tag should generate both the docs and Deprecated tag - with no annotation, and no docs - should generate nothing should generate nothing - should generate the first sentence should generate the first sentence - with a Experimental annotation, and docs - should generate both the docs and Experimental tag should generate both the docs and Experimental tag - should generate the first line should generate the first line - #formatted_doc - with a Experimental annotation, and docs - should generate both the docs and Experimental tag should generate both the docs and Experimental tag - with Experimental annotation in parameter - should generate the Experimental tag should generate the Experimental tag - with Deprecated annotation in parameter - should generate the Deprecated tag should generate the Deprecated tag - with a Deprecated annotation, and no docs - should generate just the Deprecated tag should generate just the Deprecated tag - should generate the full document should generate the full document - with alias - should generate the Experimental tag should generate the Experimental tag - with a Experimental annotation, and no docs - should generate just the Experimental tag should generate just the Experimental tag - with alias - should generate the Deprecated tag should generate the Deprecated tag - with no annotation, and no docs - should generate nothing should generate nothing - with a Deprecated annotation, and docs - should generate both the docs and Deprecated tag should generate both the docs and Deprecated tag - should generate the full document should generate the full document - generates sitemap generates sitemap - #collect_constants - returns empty array when constants are private returns empty array when constants are private - #must_include_toplevel? - returns false if program has nothing returns false if program has nothing - returns false if program has method which is defined in other place returns false if program has method which is defined in other place - returns false if program has constant which is defined in other place returns false if program has constant which is defined in other place - returns true if program has method returns true if program has method - returns true if program has macro returns true if program has macro - returns false if program has macro which is defined in other place returns false if program has macro which is defined in other place - returns true if program has constant returns true if program has constant - crystal repo - inserts pseudo methods inserts pseudo methods -Crystal::Repl::Interpreter - control flow - interprets while interprets while - interprets if pointer, false interprets if pointer, false - interprets if bool (true) interprets if bool (true) - interprets while, returns nil interprets while, returns nil - interprets if (false literal) interprets if (false literal) - interprets return interprets return - interprets break inside while interprets break inside while - interprets next inside while inside block interprets next inside while inside block - interprets return implicit nil and Int32 interprets return implicit nil and Int32 - interprets break with value inside while (through break) interprets break with value inside while (through break) - interprets if pointer, true interprets if pointer, true - interprets break inside while inside block interprets break inside while inside block - interprets if (nil literal) interprets if (nil literal) - interprets if bool (false) interprets if bool (false) - interprets until interprets until - interprets return Nil with explicit return (#12178) interprets return Nil with explicit return (#12178) - interprets return Nil interprets return Nil - interprets unless interprets unless - interprets break inside nested while interprets break inside nested while - discards if discards if - interprets if (nil type) interprets if (nil type) - interprets if union type with bool, false interprets if union type with bool, false - interprets if union type with bool, true interprets if union type with bool, true - interprets if (int type) interprets if (int type) - interprets if (true literal) interprets if (true literal) - interprets break with value inside while (through normal flow) interprets break with value inside while (through normal flow) - discards while discards while - interprets next inside while interprets next inside while - interprets if union type with nil, false interprets if union type with nil, false -Crystal::CrystalPath - finds "test_files/file_one" finds "test_files/file_one" - doesn't finds "file_two.cr" doesn't finds "file_two.cr" - doesn't finds "../crystal_path/test_files/file_one" doesn't finds "../crystal_path/test_files/file_one" - finds "simple" finds "simple" - finds "../test_folder" finds "../test_folder" - doesn't finds "./crystal_path_spec" doesn't finds "./crystal_path_spec" - doesn't finds "./crystal_path_spec.cr" doesn't finds "./crystal_path_spec.cr" - #each_file_expansion - foo foo - ./foo ./foo - foo.cr foo.cr - foo/bar/baz foo/bar/baz - foo/bar foo/bar - ./foo/bar ./foo/bar - foo.cr/bar.cr foo.cr/bar.cr - ./foo/bar/baz ./foo/bar/baz - foo.cr/bar foo.cr/bar - ./foo.cr ./foo.cr - doesn't finds "build/reproducible-path/crystal-1.18.2+dfsg/spec/compiler/crystal_path/crystal_path_spec.cr" doesn't finds "build/reproducible-path/crystal-1.18.2+dfsg/spec/compiler/crystal_path/crystal_path_spec.cr" - finds "test_files/file_one" finds "test_files/file_one" - finds "test_files/**" finds "test_files/**" - finds "test_files/file_one.cr" finds "test_files/file_one.cr" - doesn't finds "test_files/missing_file.cr" doesn't finds "test_files/missing_file.cr" - finds "../**" finds "../**" - finds "./file_two.cr" finds "./file_two.cr" - includes 'lib' by default includes 'lib' by default - .expand_paths .expand_paths - finds "test_files" finds "test_files" - finds "test_files/yet_another" finds "test_files/yet_another" - doesn't finds "../../src/file_three" doesn't finds "../../src/file_three" - finds "other_test_files" finds "other_test_files" - doesn't finds "test_folder/file_three.cr" doesn't finds "test_folder/file_three.cr" - finds "./test_folder/file_three.cr" finds "./test_folder/file_three.cr" - finds "./test_folder/*" finds "./test_folder/*" - finds "test_files/file_three" finds "test_files/file_three" - overrides path with environment variable overrides path with environment variable - finds "test_files/*" finds "test_files/*" - finds "foo.cr" finds "foo.cr" - finds "test_files/another" finds "test_files/another" - doesn't finds "test_folder/*" doesn't finds "test_folder/*" - finds "test_files/file_four" finds "test_files/file_four" -Semantic: hooks - errors if wrong extended params size errors if wrong extended params size - does not invoke 'method_added' hook recursively does not invoke 'method_added' hook recursively - errors if wrong included params size errors if wrong included params size - does inherited macro does inherited macro - includes error message in included hook (#889) includes error message in included hook (#889) - does included macro does included macro - types initializer in inherited types initializer in inherited - does inherited macro through generic instance type (#9693) does inherited macro through generic instance type (#9693) - types macro finished hook bug regarding initialize (#3964) types macro finished hook bug regarding initialize (#3964) - does added method macro does added method macro - does inherited macro for generic class does inherited macro for generic class - does included macro for generic module does included macro for generic module - does extended macro does extended macro - errors if wrong finished params length errors if wrong finished params length - errors if wrong extended params length errors if wrong extended params length - errors if wrong inherited params size errors if wrong inherited params size -Lexer string array - lexes string array with new line lexes string array with new line - using [ as delimiter - lexes simple string array lexes simple string array - lexes simple string array lexes simple string array - lexes string array with new line gives correct column for next token lexes string array with new line gives correct column for next token - using | as delimiter - lexes simple string array lexes simple string array - using < as delimiter - lexes simple string array lexes simple string array - using { as delimiter - lexes simple string array lexes simple string array -Semantic: class var - infers in multiple assign for tuple type (1) infers in multiple assign for tuple type (1) - types class var as nil if assigned for the first time inside method (#2059) types class var as nil if assigned for the first time inside method (#2059) - errors on undefined constant (1) errors on undefined constant (1) - declares class var in generic module declares class var in generic module - errors on undefined constant (2) errors on undefined constant (2) - errors if using self as type var but there's no self errors if using self as type var but there's no self - gives correct error when trying to use Int as a class variable type gives correct error when trying to use Int as a class variable type - doesn't error on recursive dependency if var is nilable (#2943) doesn't error on recursive dependency if var is nilable (#2943) - infers type from T.new infers type from T.new - errors if using local variable in initializer errors if using local variable in initializer - types class var inside instance method types class var inside instance method - can find class var through included module can find class var through included module - declares class variable declares class variable - allows self.class as type var in class body (#537) allows self.class as type var in class body (#537) - errors if redefining class var type in subclass errors if redefining class var type in subclass - types as nilable if doesn't have initializer types as nilable if doesn't have initializer - errors if redefining class var type in included module errors if redefining class var type in included module - declares class var in generic class declares class var in generic class - allows class var in primitive types (#612) allows class var in primitive types (#612) - doesn't error if accessing class variable before defined (#2941) doesn't error if accessing class variable before defined (#2941) - errors if using class variable at the top level errors if using class variable at the top level - types class var types class var - declares class variable (2) declares class variable (2) - infers type from number literal infers type from number literal - can access constant from generic metaclass (#3719) can access constant from generic metaclass (#3719) - can find class var in subclass can find class var in subclass - says undefined class variable says undefined class variable - errors when using Class (#2605) errors when using Class (#2605) - errors when typing a class variable inside a method errors when typing a class variable inside a method - declares uninitialized (#2935) declares uninitialized (#2935) - redefines class variable type redefines class variable type - errors if class variable not nilable without initializer errors if class variable not nilable without initializer - types class var as nil if not assigned at the top level types class var as nil if not assigned at the top level - errors if redefining class var type in subclass, with guess errors if redefining class var type in subclass, with guess - types class var inside proc literal inside class types class var inside proc literal inside class - can assign to class variable if this type can be up-casted to ancestors class variable type (#4869) can assign to class variable if this type can be up-casted to ancestors class variable type (#4869) -cleanup - strip tuple elements after unreachable element strip tuple elements after unreachable element - errors if assigning var to itself errors if assigning var to itself - strip named-tuple elements after unreachable element strip named-tuple elements after unreachable element - errors if assigning instance var to itself errors if assigning instance var to itself -Semantic: nil - restricts type of 'while foo' on assign restricts type of 'while foo' on assign - can call a fun with nil for pointer can call a fun with nil for pointer - marks instance variables as nil when not in initialize 2 marks instance variables as nil when not in initialize 2 - restricts type of 'if foo' on assign restricts type of 'if foo' on assign - doesn't check return type for nil doesn't check return type for nil - types empty types empty - restricts type of 'if foo' restricts type of 'if foo' - types nil types nil - marks instance variables as nil when not in initialize marks instance variables as nil when not in initialize - restricts type of 'while foo' restricts type of 'while foo' - can call a fun with nil for typedef pointer can call a fun with nil for typedef pointer - doesn't check return type for void doesn't check return type for void - marks instance variables as nil but doesn't explode on macros marks instance variables as nil but doesn't explode on macros -Semantic: automatic cast - casts literal integer (Int64 -> Int32, ok) casts literal integer (Int64 -> Int32, ok) - casts literal integer (Int32 -> Float64) casts literal integer (Int32 -> Float64) - casts integer variable to larger type (Int64 to Int128) (#9565) casts integer variable to larger type (Int64 to Int128) (#9565) - says ambiguous call for integer on alias (#6620) says ambiguous call for integer on alias (#6620) - says ambiguous call for integer var to union type (#9565) says ambiguous call for integer var to union type (#9565) - casts Symbol to Enum in ivar assignment casts Symbol to Enum in ivar assignment - casts literal integer (Int32 -> Int64) casts literal integer (Int32 -> Int64) - casts Symbol to Enum in ivar type declaration casts Symbol to Enum in ivar type declaration - casts Int32 to Int64 in ivar type declaration casts Int32 to Int64 in ivar type declaration - casts literal integer through alias with union casts literal integer through alias with union - says ambiguous call for integer says ambiguous call for integer - can autocast to union in default value can autocast to union in default value - casts literal integer through alias with union casts literal integer through alias with union - casts integer expression to larger type (#9565) casts integer expression to larger type (#9565) - casts Int32 to Int64 in ivar assignment casts Int32 to Int64 in ivar assignment - doesn't autocast number on union (#8655) doesn't autocast number on union (#8655) - casts Int32 -> Int64 in arg restriction casts Int32 -> Int64 in arg restriction - autocasts float32 variable to float64 type (#9565) autocasts float32 variable to float64 type (#9565) - casts symbol literal to enum casts symbol literal to enum - casts literal float (Float32 -> Float64) casts literal float (Float32 -> Float64) - can autocast to alias in default value can autocast to alias in default value - says ambiguous call on union (#8655) says ambiguous call on union (#8655) - casts Symbol to Enum in cvar type declaration casts Symbol to Enum in cvar type declaration - autocasts nested type from non-nested type (#10315) autocasts nested type from non-nested type (#10315) - can match multiple times with the same argument type (#7578) can match multiple times with the same argument type (#7578) - errors when autocast default value doesn't match enum member errors when autocast default value doesn't match enum member - casts Int32 to Int64 in lvar assignment casts Int32 to Int64 in lvar assignment - casts Int32 to Int64 in cvar type declaration casts Int32 to Int64 in cvar type declaration - autocasts integer variable to float type (#9565) autocasts integer variable to float type (#9565) - says ambiguous call for integer var to larger type (#9565) says ambiguous call for integer var to larger type (#9565) - says ambiguous call for integer (2) says ambiguous call for integer (2) - matches correct overload matches correct overload - can autocast to union in default value (symbol and int) can autocast to union in default value (symbol and int) - casts literal integer (Int32 -> no restriction) casts literal integer (Int32 -> no restriction) - casts literal float (Float64 -> Float32) casts literal float (Float64 -> Float32) - can autocast to union in default value (multiple enums) can autocast to union in default value (multiple enums) - doesn't say 'ambiguous call' when there's an exact match for symbol (#6601) doesn't say 'ambiguous call' when there's an exact match for symbol (#6601) - can't cast integer to another type when it doesn't fit (#9565) can't cast integer to another type when it doesn't fit (#9565) - doesn't say 'ambiguous call' when there's an exact match for integer (#6601) doesn't say 'ambiguous call' when there's an exact match for integer (#6601) - casts Int32 to Int64 in cvar assignment casts Int32 to Int64 in cvar assignment - casts literal integer in private top-level method (#7016) casts literal integer in private top-level method (#7016) - casts literal integer (Int32 -> Float32) casts literal integer (Int32 -> Float32) - casts Int32 to Int64 in ivar type declaration in generic casts Int32 to Int64 in ivar type declaration in generic - can use automatic cast with `with ... yield` (#7736) can use automatic cast with `with ... yield` (#7736) - doesn't cast integer variable to larger type (not #9565) doesn't cast integer variable to larger type (not #9565) - errors if symbol name doesn't match enum member errors if symbol name doesn't match enum member - autocasts first argument and second matches without autocast autocasts first argument and second matches without autocast - casts literal integer (Int64 -> Int32, too big) casts literal integer (Int64 -> Int32, too big) - doesn't do multidispatch if an overload matches exactly (#8217) doesn't do multidispatch if an overload matches exactly (#8217) - says ambiguous call for symbol says ambiguous call for symbol - doesn't do multidispatch if an overload matches exactly (#8217) doesn't do multidispatch if an overload matches exactly (#8217) - casts integer variable to larger type (#9565) casts integer variable to larger type (#9565) -Code gen: splat - splats with another arg splats with another arg - splats without args splats without args - splats on call splats on call - splats in initialize splats in initialize - splats splats - evaluates splat argument just once (#2677) evaluates splat argument just once (#2677) - splats with default value splats with default value - splats with default value (2) splats with default value (2) - does #2407 does #2407 - splats with default value (3) splats with default value (3) -Crystal::Command::FormatCommand - checks files format (ok) checks files format (ok) - formats stdin (invalid byte sequence error) formats stdin (invalid byte sequence error) - formats stdin (formatted) formats stdin (formatted) - formats files (error) formats files (error) - formats stdin (bug + show-backtrace) formats stdin (bug + show-backtrace) - formats files formats files - formats files (bug) formats files (bug) - formats stdin (syntax error) formats stdin (syntax error) - formats stdin formats stdin - formats files (dir) formats files (dir) - checks files format (excludes + includes) checks files format (excludes + includes) - formats stdin (bug) formats stdin (bug) - checks files format checks files format - formats files (bug + show-stacktrace) formats files (bug + show-stacktrace) - checks files format (excludes) checks files format (excludes) -Crystal::Repl::Interpreter - typeof - interprets typeof instance type interprets typeof instance type - interprets typeof virtual type interprets typeof virtual type - interprets typeof metaclass type interprets typeof metaclass type -.validate_name - invalid character invalid character - length length - digits digits - uppercase uppercase - empty empty - underscores underscores - dashes dashes -Code gen: named tuple - upcasts named tuple inside compatible named tuple upcasts named tuple inside compatible named tuple - gets size at compile time gets size at compile time - codegens tuple index codegens tuple index - doesn't error if NamedTuple includes a non-generic module (#10380) doesn't error if NamedTuple includes a non-generic module (#10380) - merges two named tuple types with same keys but different types (2) merges two named tuple types with same keys but different types (2) - codegens union of tuple of float with tuple of tuple of float codegens union of tuple of float with tuple of tuple of float - codegens tuple nilable index (1) codegens tuple nilable index (1) - downcasts union inside tuple to value (#3907) downcasts union inside tuple to value (#3907) - upcasts named tuple union to compatible named tuple upcasts named tuple union to compatible named tuple - merges two named tuple types with same keys but different types (1) merges two named tuple types with same keys but different types (1) - provides T as a named tuple literal provides T as a named tuple literal - doesn't crash when overload doesn't match doesn't crash when overload doesn't match - upcasts named tuple inside union to union with compatible named tuple upcasts named tuple inside union to union with compatible named tuple - gets keys at compile time (1) gets keys at compile time (1) - gets keys at compile time (2) gets keys at compile time (2) - passes named tuple to def passes named tuple to def - codegens tuple nilable index (3) codegens tuple nilable index (3) - accesses T and creates instance from it accesses T and creates instance from it - assigns two same-size named tuple types to a same var (#3132) assigns two same-size named tuple types to a same var (#3132) - assigns named tuple union to compatible named tuple assigns named tuple union to compatible named tuple - assigns named tuple inside union to union with compatible named tuple assigns named tuple inside union to union with compatible named tuple - codegens tuple index another order codegens tuple index another order - codegens tuple nilable index (2) codegens tuple nilable index (2) - assigns named tuple to compatible named tuple assigns named tuple to compatible named tuple - allows named tuple covariance allows named tuple covariance - does to_s for NamedTuple class does to_s for NamedTuple class does to_s for NamedTuple class does to_s for NamedTuple class does to_s for NamedTuple class does to_s for NamedTuple class does to_s for NamedTuple class does to_s for NamedTuple class does to_s for NamedTuple class does to_s for NamedTuple class -Semantic: annotation - errors when annotate instance variable in subclass errors when annotate instance variable in subclass - errors if wanting to add type inside annotation (2) (#8614) errors if wanting to add type inside annotation (2) (#8614) - #annotation - can't find annotation in instance var can't find annotation in instance var - finds annotation on method double splat arg finds annotation on method double splat arg - finds annotation in module finds annotation in module - finds annotation in enum finds annotation in enum - finds annotation on method arg finds annotation on method arg - finds annotation in instance var (declaration) finds annotation in instance var (declaration) - finds annotation in lib finds annotation in lib - finds annotation in class finds annotation in class - errors if using invalid annotation on fun errors if using invalid annotation on fun - adds annotation on def adds annotation on def - doesn't carry link annotation from lib to fun doesn't carry link annotation from lib to fun - finds annotation on an restricted method block arg finds annotation on an restricted method block arg - uses annotation value, positional uses annotation value, positional - can't find annotation in module can't find annotation in module - uses annotation value, keyword uses annotation value, keyword - finds annotation in generic parent (#7885) finds annotation in generic parent (#7885) - finds annotation on method splat arg finds annotation on method splat arg - can't find annotation on def can't find annotation on def - finds annotation in struct finds annotation in struct - can't find annotation in instance var, when other annotations are present can't find annotation in instance var, when other annotations are present - errors if annotation doesn't point to an annotation type errors if annotation doesn't point to an annotation type - can't find annotation in module, when other annotations are present can't find annotation in module, when other annotations are present - errors if annotation doesn't exist errors if annotation doesn't exist - errors if using annotation other than ThreadLocal for class vars errors if using annotation other than ThreadLocal for class vars - overrides annotation in instance var overrides annotation in instance var - overrides annotation value in type overrides annotation value in type - finds annotation in instance var (declaration, generic) finds annotation in instance var (declaration, generic) - can't find annotation on def, when other annotations are present can't find annotation on def, when other annotations are present - finds annotation in instance var (assignment) finds annotation in instance var (assignment) - #annotations - of a specific type - uses annotations value, positional uses annotations value, positional - can't find annotations on def can't find annotations on def - can't find annotations on def, when other annotations are present can't find annotations on def, when other annotations are present - overrides annotations value in type overrides annotations value in type - finds annotations in generic parent (#7885) finds annotations in generic parent (#7885) - find annotations on method parameters find annotations on method parameters - finds annotations in instance var (declaration) finds annotations in instance var (declaration) - uses annotations value, keyword uses annotations value, keyword - finds annotations in struct finds annotations in struct - collects annotations values in type collects annotations values in type - returns an empty array if there are none defined returns an empty array if there are none defined - can't find annotations in instance var, when other annotations are present can't find annotations in instance var, when other annotations are present - finds annotations in enum finds annotations in enum - adds annotations on def adds annotations on def - finds annotations in class finds annotations in class - can't find annotations in instance var can't find annotations in instance var - finds annotations on a module finds annotations on a module - finds annotations in lib finds annotations in lib - finds annotations in instance var (declaration, generic) finds annotations in instance var (declaration, generic) - all types - finds annotations on a module finds annotations on a module - finds annotations on a class finds annotations on a class - finds annotations on a lib finds annotations on a lib - finds annotations in instance var (declaration, generic) finds annotations in instance var (declaration, generic) - finds annotations on a enum finds annotations on a enum - finds annotations in instance var (declaration) finds annotations in instance var (declaration) - adds annotations on def adds annotations on def - find annotations on method parameters find annotations on method parameters - finds annotations in generic parent (#7885) finds annotations in generic parent (#7885) - returns an empty array if there are none defined returns an empty array if there are none defined - finds annotations on a struct finds annotations on a struct - arguments - #args - returns a TupleLiteral if there are positional arguments defined returns a TupleLiteral if there are positional arguments defined - returns an empty TupleLiteral if there are none defined returns an empty TupleLiteral if there are none defined - returns a correctly with named and positional args returns a correctly with named and positional args - #named_args - returns an empty NamedTupleLiteral if there are none defined returns an empty NamedTupleLiteral if there are none defined - returns a NamedTupleLiteral if there are named arguments defined returns a NamedTupleLiteral if there are named arguments defined - doesn't bleed annotation from class into class variable (#8314) doesn't bleed annotation from class into class variable (#8314) - declares annotation declares annotation - errors if wanting to add type inside annotation (1) (#8614) errors if wanting to add type inside annotation (1) (#8614) -Crystal::Repl::Interpreter - named tuple - discards named tuple (#12383) discards named tuple (#12383) - interprets named tuple metaclass indexer interprets named tuple metaclass indexer - interprets named tuple literal and access by known index interprets named tuple literal and access by known index -Semantic: tuples - can iterate T can iterate T - #[](Path) - works for named tuple indexer works for named tuple indexer - works for tuple indexer works for tuple indexer - can call [] on T can call [] on T - matches tuple with splat (2) (#2932) matches tuple with splat (2) (#2932) - errors if non-tuple is splatted inside tuple (2) errors if non-tuple is splatted inside tuple (2) - allows tuple covariance allows tuple covariance - types tuple with splats inside types tuple with splats inside - doesn't unify tuple metaclasses (#5384) doesn't unify tuple metaclasses (#5384) - types tuple of three elements types tuple of three elements - errors on named tuple too big errors on named tuple too big - types tuple of one element and then two elements types tuple of one element and then two elements - doesn't trigger recursive splat expansion error (#7164) doesn't trigger recursive splat expansion error (#7164) - errors if using two splat indices on restriction errors if using two splat indices on restriction - errors on recursive splat expansion (#218) errors on recursive splat expansion (#218) - errors on tuple too big (#3816) errors on tuple too big (#3816) - types tuple of one element types tuple of one element - #[](NumberLiteral) - types, inbound index, nilable types, inbound index, nilable - types, metaclass index types, metaclass index - gives error when indexing out of range gives error when indexing out of range - gives error when indexing out of range on empty tuple gives error when indexing out of range on empty tuple - types, inbound index types, inbound index - types, out of bound, nilable types, out of bound, nilable - gives error when using named args on Tuple gives error when using named args on Tuple - errors on recursive splat expansion (1) (#361) errors on recursive splat expansion (1) (#361) - #[](RangeLiteral) - types, inbound begin, nilable types, inbound begin, nilable - types, begin-less types, begin-less - types, inbound begin types, inbound begin - types, inbound begin, end-less types, inbound begin, end-less - types, exclusive range types, exclusive range - types, metaclass index types, metaclass index - types, begin-less, end-less types, begin-less, end-less - gives error when begin index is out of range gives error when begin index is out of range - types, out of bound begin, nilable types, out of bound begin, nilable - doesn't crash on tuple in not executed block (#6718) doesn't crash on tuple in not executed block (#6718) - errors on recursive splat expansion (2) (#361) errors on recursive splat expansion (2) (#361) - accepts tuple covariance in array accepts tuple covariance in array - merges two tuple types of same size merges two tuple types of same size - types T as a tuple of metaclasses types T as a tuple of metaclasses - accept tuple in type restriction accept tuple in type restriction - errors if non-tuple is splatted inside tuple errors if non-tuple is splatted inside tuple - matches tuple with splat (#2932) matches tuple with splat (#2932) - can name a tuple type can name a tuple type - doesn't error if Tuple has no args doesn't error if Tuple has no args -Block inference - respects block arg restriction when block has a splat parameter (2) (#9524) respects block arg restriction when block has a splat parameter (2) (#9524) - errors if splat parameter becomes a union errors if splat parameter becomes a union - uses splat in block parameter uses splat in block parameter - reports error if block type doesn't match reports error if block type doesn't match - passes #233: block with initialize with default args passes #233: block with initialize with default args - does next from block with value 2 does next from block with value 2 - doesn't crash on cleaning up typeof node without dependencies (#8669) doesn't crash on cleaning up typeof node without dependencies (#8669) - reports error if block didn't return expected type reports error if block didn't return expected type - types empty block types empty block - allows initialize with yield (#224) allows initialize with yield (#224) - errors if proc is not instantiated errors if proc is not instantiated - infer type of local variable infer type of local variable - errors on recursive yield with ProcNotation restriction errors on recursive yield with ProcNotation restriction - uses block var with same name as local var uses block var with same name as local var - infers type of block before call infers type of block before call - auto-unpacks tuple, captured block with multiple statements auto-unpacks tuple, captured block with multiple statements - infers type of block before call taking other args free vars into account infers type of block before call taking other args free vars into account - types recursive hash assignment types recursive hash assignment - sets captured block type to that of restriction sets captured block type to that of restriction - auto-unpacks tuple, too many args auto-unpacks tuple, too many args - errors if declares enum inside block errors if declares enum inside block - error with self input type doesn't match error with self input type doesn't match - allows underscore in block return type even if the return type can't be computed allows underscore in block return type even if the return type can't be computed - does next from block with value does next from block with value - reports error if yields a type that later changes and that's not that one in the block specification reports error if yields a type that later changes and that's not that one in the block specification - errors if declares def inside block errors if declares def inside block - infer type of block body infer type of block body - unpacks block argument unpacks block argument - reports mismatch with generic argument type in input type reports mismatch with generic argument type in input type - respects block arg restriction when block has a splat parameter (#6473) respects block arg restriction when block has a splat parameter (#6473) - errors if declares macro inside block errors if declares macro inside block - reports error if yields a type that's not that one in the block specification reports error if yields a type that's not that one in the block specification - returns from proc literal returns from proc literal - infers type of block with generic type infers type of block with generic type - yields splat and non splat yields splat and non splat - checks block type with virtual type checks block type with virtual type - errors if declares module inside block errors if declares module inside block - errors if alias is not a fun type errors if alias is not a fun type - ignores void return type (2) (#427) ignores void return type (2) (#427) - doesn't fail with 'already had enclosing call' (#11200) doesn't fail with 'already had enclosing call' (#11200) - reports error if yields a type that's not that one in the block specification reports error if yields a type that's not that one in the block specification - uses splat in block parameter, many args uses splat in block parameter, many args - errors if using Bar | Object as block return type (#2358) errors if using Bar | Object as block return type (#2358) - matches block with generic type and free var matches block with generic type and free var - errors when using local variable with block parameter name errors when using local variable with block parameter name - does next from block without value does next from block without value - auto-unpacks tuple auto-unpacks tuple - auto-unpacks tuple, less than max, captured block auto-unpacks tuple, less than max, captured block - uses block arg, too many parameters uses block arg, too many parameters - auto-unpacks tuple, too many args, captured block auto-unpacks tuple, too many args, captured block - correctly types unpacked tuple block arg after block (#3339) correctly types unpacked tuple block arg after block (#3339) - yields in overload, matches type yields in overload, matches type - infer type of empty block body infer type of empty block body - errors if declares alias inside block errors if declares alias inside block - errors if doing next in proc literal errors if doing next in proc literal - recalculates call that uses block arg output as free var recalculates call that uses block arg output as free var - ignores void return type (#427) ignores void return type (#427) - errors if declares include inside block errors if declares include inside block - ignores void return type (3) (#427) ignores void return type (3) (#427) - error with self output type doesn't match error with self output type doesn't match - yields with different types yields with different types - matches block arg return type matches block arg return type - infer type of yield infer type of yield - infer type of block parameter infer type of block parameter - errors if yields from top level errors if yields from top level - errors on recursive yield with non ProcNotation restriction (#6896) errors on recursive yield with non ProcNotation restriction (#6896) - allows alias as block fun type allows alias as block fun type - errors if declares fun inside block errors if declares fun inside block - preserves type filters in block preserves type filters in block - errors if invoking new with block when no initialize is defined errors if invoking new with block when no initialize is defined - ignores block parameter if not used ignores block parameter if not used - errors if declares lib inside block errors if declares lib inside block - errors if breaks from captured block errors if breaks from captured block - doesn't auto-unpack tuple, more args doesn't auto-unpack tuple, more args - errors on recursive yield errors on recursive yield - infer type with union infer type with union - maps block of union types to union types maps block of union types to union types - reports error if block changes type reports error if block changes type - reports error if missing arguments to yield reports error if missing arguments to yield - binds to proc, not only to its body (#1796) binds to proc, not only to its body (#1796) - uses free var in return type with tuple type uses free var in return type with tuple type - auto-unpacks tuple, captured empty block auto-unpacks tuple, captured empty block - auto-unpacks tuple, captured block auto-unpacks tuple, captured block - finds type inside module in block finds type inside module in block - doesn't mix local var with block var, using break (#2314) doesn't mix local var with block var, using break (#2314) - uses free var in return type in captured block uses free var in return type in captured block - errors if declares class inside captured block errors if declares class inside captured block - auto-unpacks tuple, less than max auto-unpacks tuple, less than max - infer type with self block arg infer type with self block arg - break without value has nil type break without value has nil type - reports error on method instantiate (#4543) reports error on method instantiate (#4543) - renders expected block return type of a free variable on mismatch renders expected block return type of a free variable on mismatch - allows yielding multiple types when a union is expected allows yielding multiple types when a union is expected - break from block without value break from block without value - auto-unpacks with block arg type auto-unpacks with block arg type - doesn't crash on #2531 doesn't crash on #2531 - binds block return type free variable even if there are no block parameters (#1797) binds block return type free variable even if there are no block parameters (#1797) - errors if declares extend inside block errors if declares extend inside block - doesn't mix local var with block var, using next (#2314) doesn't mix local var with block var, using next (#2314) - does next from captured block does next from captured block - ignores void return type (4) ignores void return type (4) - errors if using (Object ->) as block return type (#2358) errors if using (Object ->) as block return type (#2358) - errors if using ( -> Object) as block return type (#2358) errors if using ( -> Object) as block return type (#2358) - reports mismatch with generic argument type in output type reports mismatch with generic argument type in output type - types bug with yield not_nil! that is never not nil types bug with yield not_nil! that is never not nil - can infer block type given that the method has a return type (#7160) can infer block type given that the method has a return type (#7160) - errors if using Object as block return type (#2358) errors if using Object as block return type (#2358) - sets captured block type to that of restriction with alias sets captured block type to that of restriction with alias - doesn't assign block variable type to last value (#694) doesn't assign block variable type to last value (#694) - uses block return type as return type, even if can't infer block type uses block return type as return type, even if can't infer block type - errors if declares class inside block errors if declares class inside block - errors if returns from captured block errors if returns from captured block - allows invoking method on a object of a captured block with a type that was never instantiated allows invoking method on a object of a captured block with a type that was never instantiated - uses splat in block parameter, but not enough yield expressions uses splat in block parameter, but not enough yield expressions - passes &->f passes &->f - yields splat yields splat - passes #262 passes #262 -file_exists? - with relative path - reads file (doesn't exist) reads file (doesn't exist) - reads file (exists) reads file (exists) - with absolute path - returns false if file doesn't exist returns false if file doesn't exist - returns true if file exists returns true if file exists -Init invocation - doesn't error when asked to skip existing files doesn't error when asked to skip existing files - doesn't error if files will be overwritten by a generated file and --force is used doesn't error if files will be overwritten by a generated file and --force is used - honors the custom set directory name honors the custom set directory name - errors if files will be overwritten by a generated file errors if files will be overwritten by a generated file - produces valid yaml file produces valid yaml file - prints error if a file is already present prints error if a file is already present -Semantic: virtual - works with restriction alpha works with restriction alpha - types instance var as virtual when using type declaration and has subclasses types instance var as virtual when using type declaration and has subclasses - doesn't check methods on abstract classes doesn't check methods on abstract classes - reports undefined method in subclass of abstract class reports undefined method in subclass of abstract class - types class and subclass as one type types class and subclass as one type - checks method in every concrete subclass but method in Object checks method in every concrete subclass but method in Object - finds overloads of union of virtual, class and nil finds overloads of union of virtual, class and nil - types class and two subclasses types class and two subclasses - checks cover in every concrete subclass 3 checks cover in every concrete subclass 3 - uses virtual type as generic type if class is abstract uses virtual type as generic type if class is abstract - checks cover in every concrete subclass checks cover in every concrete subclass - checks cover in every concrete subclass 2 checks cover in every concrete subclass 2 - doesn't check cover for subclasses doesn't check cover for subclasses - types inspect types inspect - types method call of virtual type types method call of virtual type - types method call of virtual type with override types method call of virtual type with override - uses virtual type as generic type if class is abstract even in union uses virtual type as generic type if class is abstract even in union - restricts with union and doesn't merge to super type restricts with union and doesn't merge to super type - removes instance var from subclasses removes instance var from subclasses - automatically does virtual for generic type if there are subclasses automatically does virtual for generic type if there are subclasses - reports missing cover for subclass of abstract class reports missing cover for subclass of abstract class - doesn't check cover for abstract classes doesn't check cover for abstract classes - dispatches virtual method with overload dispatches virtual method with overload - dispatches virtual method dispatches virtual method - finds overloads of union of virtual, class and nil with abstract class finds overloads of union of virtual, class and nil with abstract class - doesn't check methods on abstract classes 2 doesn't check methods on abstract classes 2 - types two subclasses types two subclasses - reports no matches for virtual type reports no matches for virtual type - types two classes without a shared virtual types two classes without a shared virtual -Crystal::Playground::Session - assert assert -error reporting - reports unexpected named argument reports unexpected named argument - uses correct name for top-level macro methods uses correct name for top-level macro methods - reports unexpected block reports unexpected block - reports missing block reports missing block - reports wrong number of arguments reports wrong number of arguments - reports unexpected named argument (2) reports unexpected named argument (2) - reports wrong number of arguments, with optional parameters reports wrong number of arguments, with optional parameters -Semantic: generic class - accesses generic type argument from superclass, metaclass context accesses generic type argument from superclass, metaclass context - errors if using Value in a generic type errors if using Value in a generic type - allows T::Type with T a generic type allows T::Type with T a generic type - can use type var that resolves to number in restriction using Int128 can use type var that resolves to number in restriction using Int128 - instantiates generic variadic class, accesses T from instance method instantiates generic variadic class, accesses T from instance method - gives helpful error message when generic type var is missing (#1526) gives helpful error message when generic type var is missing (#1526) - resolves T through metaclass inheritance (#7914) resolves T through metaclass inheritance (#7914) - inherits class methods from generic class inherits class methods from generic class - allows initializing instance variable in inherited generic type allows initializing instance variable in inherited generic type - restricts generic type argument through alias in a non-strict way restricts generic type argument through alias in a non-strict way - doesn't allow union of generic class with module to be assigned to a generic class with module (#2425) doesn't allow union of generic class with module to be assigned to a generic class with module (#2425) - inherits instance var type annotation from generic to concrete inherits instance var type annotation from generic to concrete - errors if using Object in a generic type errors if using Object in a generic type - errors if using Number | String in a generic type errors if using Number | String in a generic type - gives helpful error message when generic type var is missing in block spec (#1526) gives helpful error message when generic type var is missing in block spec (#1526) - doesn't crash when matching restriction against number literal (#3157) doesn't crash when matching restriction against number literal (#3157) - doesn't compute generic instance var initializers in formal superclass's context (#4753) doesn't compute generic instance var initializers in formal superclass's context (#4753) - errors if invoking new on private new in generic type (#3485) errors if invoking new on private new in generic type (#3485) - errors if splatting a non-tuple (#9853) errors if splatting a non-tuple (#9853) - doesn't find T type parameter of current type in superclass (#4604) doesn't find T type parameter of current type in superclass (#4604) - instantiates generic variadic class, accesses T from instance method through superclass, more args instantiates generic variadic class, accesses T from instance method through superclass, more args - inherits from generic with instantiation inherits from generic with instantiation - errors if using Number in recursive alias errors if using Number in recursive alias - virtual metaclass type implements super virtual metaclass type (#3007) virtual metaclass type implements super virtual metaclass type (#3007) - errors if using Reference in a generic type errors if using Reference in a generic type - errors if using Pointer in a generic type errors if using Pointer in a generic type - finds generic type argument from method with default value finds generic type argument from method with default value - inherits non-generic to generic (1) inherits non-generic to generic (1) - inherits from generic with forwarding (2) inherits from generic with forwarding (2) - calls super on generic type when superclass has no initialize (#933) calls super on generic type when superclass has no initialize (#933) - instantiates generic variadic class, accesses T from instance method, more args instantiates generic variadic class, accesses T from instance method, more args - replaces type parameters in virtual metaclasses (#10691) replaces type parameters in virtual metaclasses (#10691) - errors if passing integer literal to Tuple as generic argument (#1120) errors if passing integer literal to Tuple as generic argument (#1120) - error on T::Type with T a generic type that's a union error on T::Type with T a generic type that's a union - doesn't crash when matching restriction against number literal (2) (#3157) doesn't crash when matching restriction against number literal (2) (#3157) - instantiates generic variadic class, accesses T from instance method through superclass instantiates generic variadic class, accesses T from instance method through superclass - defines empty initialize on inherited generic class defines empty initialize on inherited generic class - never types Path as virtual outside generic type parameter (#3989) never types Path as virtual outside generic type parameter (#3989) - correctly checks argument count when target type has a splat (#9855) correctly checks argument count when target type has a splat (#9855) - unifies generic metaclass types unifies generic metaclass types - errors if using Class in a generic type errors if using Class in a generic type - errors on too nested tuple instance errors on too nested tuple instance - recomputes on new subclass recomputes on new subclass - accesses generic type argument from superclass, inherited #initialize (2) (#5243) accesses generic type argument from superclass, inherited #initialize (2) (#5243) - errors if using Struct in a generic type errors if using Struct in a generic type - subclasses twice with same generic class (#3423) subclasses twice with same generic class (#3423) - errors if passing integer literal to Proc as generic argument (#1120) errors if passing integer literal to Proc as generic argument (#1120) - doesn't duplicate overload on generic class with class method (#2385) doesn't duplicate overload on generic class with class method (#2385) - types macro def with generic instance types macro def with generic instance - inherits twice inherits twice - shows error due to generic instantiation (#7083) shows error due to generic instantiation (#7083) - errors if using Float in a generic type errors if using Float in a generic type - restricts generic to generic with free var restricts generic to generic with free var - doesn't find unbound type parameter in main code inside generic type (#6168) doesn't find unbound type parameter in main code inside generic type (#6168) - restricts non-generic to generic with free var restricts non-generic to generic with free var - uses inherited #initialize from superclass when generic type parameters are identical uses inherited #initialize from superclass when generic type parameters are identical - errors if using Number in alias errors if using Number in alias - restricts virtual generic instance type against generic (#3351) restricts virtual generic instance type against generic (#3351) - errors if using StaticArray in a generic type errors if using StaticArray in a generic type - never types Generic as virtual outside generic type parameter (#3989) never types Generic as virtual outside generic type parameter (#3989) - errors on too nested generic instance, with union type errors on too nested generic instance, with union type - errors if inheriting from generic and incorrect number of type vars errors if inheriting from generic and incorrect number of type vars - inherits instance var type annotation from generic to concrete with T inherits instance var type annotation from generic to concrete with T - inherits from generic with instantiation with instance var inherits from generic with instantiation with instance var - creates pointer of generic type and uses it (2) creates pointer of generic type and uses it (2) - inherits from generic with forwarding (1) inherits from generic with forwarding (1) - instantiates generic variadic class, accesses T from class method instantiates generic variadic class, accesses T from class method - errors if inheriting from generic when it is non-generic errors if inheriting from generic when it is non-generic - can define instance var forward declared (#962) can define instance var forward declared (#962) - inherits non-generic to generic (2) inherits non-generic to generic (2) - replaces type parameters for virtual types (#3235) replaces type parameters for virtual types (#3235) - accesses generic type argument from superclass, macro context accesses generic type argument from superclass, macro context - accesses generic type argument from superclass, def restriction accesses generic type argument from superclass, def restriction - accesses generic type argument from superclass, def context (#10834) accesses generic type argument from superclass, def context (#10834) - errors on too nested generic instance errors on too nested generic instance - restricts non-generic to generic restricts non-generic to generic - nests generics with the same type var (#3297) nests generics with the same type var (#3297) - errors if using Int in a generic type errors if using Int in a generic type - errors if passing integer literal to Union as generic argument errors if passing integer literal to Union as generic argument - errors if using Enum in a generic type errors if using Enum in a generic type - instantiates generic variadic class, accesses T from class method through superclass instantiates generic variadic class, accesses T from class method through superclass - disallow using a non-instantiated generic type as a generic type argument disallow using a non-instantiated generic type as a generic type argument - can use type var that resolves to number in restriction (#6502) can use type var that resolves to number in restriction (#6502) - accesses generic type argument from superclass, inherited #initialize (1) (#5243) accesses generic type argument from superclass, inherited #initialize (1) (#5243) - splats generic type var splats generic type var - creates pointer of generic type and uses it creates pointer of generic type and uses it - instantiates generic variadic class, accesses T from instance method, more args (2) instantiates generic variadic class, accesses T from instance method, more args (2) - can use virtual type for generic class can use virtual type for generic class - allows initializing instance variable (#665) allows initializing instance variable (#665) - initializes instance variable of generic type using type var (#961) initializes instance variable of generic type using type var (#961) - disallow using a non-instantiated module type as a generic type argument disallow using a non-instantiated module type as a generic type argument - doesn't consider unbound generic instantiations as concrete (#7200) doesn't consider unbound generic instantiations as concrete (#7200) - errors if inheriting generic type and not specifying type vars (#460) errors if inheriting generic type and not specifying type vars (#460) - inherits instance var type annotation from generic to generic to concrete inherits instance var type annotation from generic to generic to concrete - errors if using Proc in a generic type errors if using Proc in a generic type - instantiates generic class with default argument in initialize (#394) instantiates generic class with default argument in initialize (#394) - errors if using Tuple in a generic type errors if using Tuple in a generic type - errors if using Number in a generic type errors if using Number in a generic type -Normalize: until - normalizes until normalizes until -read_file? - with absolute path - reads file (doesn't exist) reads file (doesn't exist) - with relative path - reads file (doesn't exist) reads file (doesn't exist) -Parser doc - includes doc for call without obj includes doc for call without obj - includes doc for abstract class includes doc for abstract class - includes doc for union def inside lib def includes doc for union def inside lib def - includes doc for class includes doc for class - includes doc for enum def includes doc for enum def - includes doc for struct includes doc for struct - includes doc for lib def includes doc for lib def - includes doc for cstruct fields includes doc for cstruct fields - includes doc for abstract def includes doc for abstract def - includes doc for alias includes doc for alias - includes doc for def includes doc for def - includes doc for private def includes doc for private def - includes doc for constant assign includes doc for constant assign - includes doc for fun def inside lib def includes doc for fun def inside lib def - includes doc for module includes doc for module - includes doc for annotation includes doc for annotation - includes doc for cstruct def inside lib def includes doc for cstruct def inside lib def - includes doc for fun def includes doc for fun def - disables doc parsing inside defs disables doc parsing inside defs - includes doc for external var inside lib def includes doc for external var inside lib def - includes doc for type def inside lib def includes doc for type def inside lib def - includes doc for macro includes doc for macro -Code gen: ssa - codegens ssa bug with if/else on var codegens ssa bug with if/else on var - codegens a var that is re-assigned in a block codegens a var that is re-assigned in a block - codegens a var that is declared in a block (1) codegens a var that is declared in a block (1) - codegens a redefined var codegens a redefined var - codegens a var that is declared in a block (2) codegens a var that is declared in a block (2) - codegens ssa bug (2) codegens ssa bug (2) - codegens a var that is re-assigned in a block (2) codegens a var that is re-assigned in a block (2) - codegens declaration of var inside then when false codegens declaration of var inside then when false - codegens a var that is re-assigned in a block (1) codegens a var that is re-assigned in a block (1) - codegens ssa bug (1) codegens ssa bug (1) - codegens declaration of var inside then when true codegens declaration of var inside then when true - codegens a redefined var inside method codegens a redefined var inside method - codegens a redefined var inside method with argument codegens a redefined var inside method with argument -Crystal::Doc::Type - ASTNode has no ancestors ASTNode has no ancestors - #instance_methods - sorts operators first sorts operators first - #node_to_html - shows named tuples shows named tuples - shows generic path with unnecessary colons shows generic path with unnecessary colons - shows relative generic shows relative generic - shows generic path with necessary colons shows generic path with necessary colons - shows relative path shows relative path - shows tuples shows tuples - #macros - sorts operators first sorts operators first - ASTNode has no superclass ASTNode has no superclass - #class_methods - sorts operators first sorts operators first - finds construct when searching class method (#8095) finds construct when searching class method (#8095) - doesn't show types for alias type doesn't show types for alias type -Normalize: or - normalizes or with ! on var.is_a?(...) normalizes or with ! on var.is_a?(...) - normalizes or with is_a? on var normalizes or with is_a? on var - normalizes or without variable normalizes or without variable - normalizes or with assignment on the left normalizes or with assignment on the left - normalizes or with variable on the left normalizes or with variable on the left - normalizes or with ! on var normalizes or with ! on var -Code gen: type declaration - codegens initialize instance var codegens initialize instance var - declares and initializes declares and initializes - declares and initializes var declares and initializes var - codegens initialize instance var with var declaration codegens initialize instance var with var declaration - codegens initialize instance var of superclass codegens initialize instance var of superclass -Crystal::Repl::Interpreter - blocks - clears block local variables when calling block (2) clears block local variables when calling block (2) - interprets block with both splat and non-splat underscore parameter (#13474) interprets block with both splat and non-splat underscore parameter (#13474) - interprets with ... yield with extra arguments (#12296) interprets with ... yield with extra arguments (#12296) - caches method with captured block (#12276) caches method with captured block (#12276) - discards yield expression discards yield expression - interprets break inside block (union, through return) interprets break inside block (union, through return) - interprets with ... yield with struct interprets with ... yield with struct - interprets next inside block interprets next inside block - interprets block with args that conflict with a local var interprets block with args that conflict with a local var - captures non-closure block captures non-closure block - interprets break inside block (union, through normal flow) interprets break inside block (union, through normal flow) - interprets block with args that conflict with a local var interprets block with args that conflict with a local var - interprets yield with splat, block with splat interprets yield with splat, block with splat - interprets yield inside another block interprets yield inside another block - casts yield expression to block var type (not block arg type) casts yield expression to block var type (not block arg type) - interprets next inside block (union, through normal exit) interprets next inside block (union, through normal exit) - considers block arg without type as having NoReturn type (2) (#12270) considers block arg without type as having NoReturn type (2) (#12270) - interprets yield inside def with arguments interprets yield inside def with arguments - interprets with ... yield interprets with ... yield - interprets yield with splat, block with splat (#12227) interprets yield with splat, block with splat (#12227) - yields different values to form a union yields different values to form a union - clears block local variables when calling block clears block local variables when calling block - interprets block with multiple yields interprets block with multiple yields - interprets yield with splat, less block arguments interprets yield with splat, less block arguments - interprets break inside block (union, through break) interprets break inside block (union, through break) - interprets block with splat interprets block with splat - interprets yield with splat (1) interprets yield with splat (1) - interprets yield expression interprets yield expression - returns from block returns from block - interprets yield return value interprets yield return value - interprets simplest block interprets simplest block - counts with ... yield scope in block args bytesize (#12316) counts with ... yield scope in block args bytesize (#12316) - interprets next inside block (union, through next) interprets next inside block (union, through next) - interprets break inside block interprets break inside block - interprets yield expressions interprets yield expressions - considers block arg without type as having NoReturn type (#12270) considers block arg without type as having NoReturn type (#12270) - interprets yield with splat (2) interprets yield with splat (2) - interprets underscore parameters corresponding to yield arguments with different types (#13474) interprets underscore parameters corresponding to yield arguments with different types (#13474) - interprets underscore parameters corresponding to yield arguments with different types + tuple unpacking (#13474) interprets underscore parameters corresponding to yield arguments with different types + tuple unpacking (#13474) -Crystal::Repl::Interpreter - exception handling - does ensure without rescue/raise does ensure without rescue/raise - does ensure for else does ensure for else - executes ensure when returning a big value from a block executes ensure when returning a big value from a block - does else does else - executes ensure when exception is raised in body executes ensure when exception is raised in body - executes ensure when returning from a block executes ensure when returning from a block - executes ensure when breaking from a block executes ensure when breaking from a block - does rescue when nothing is raised does rescue when nothing is raised - executes ensure when returning from a block (2) executes ensure when returning from a block (2) - raises and rescues anything, does ensure when an exception is rescued raises and rescues anything, does ensure when an exception is rescued - executes ensure when exception is raised in rescue executes ensure when exception is raised in rescue - raises and rescues specific exception type raises and rescues specific exception type - raises and rescues anything raises and rescues anything - captures exception in variable captures exception in variable - does ensure for else when else raises does ensure for else when else raises - does ensure with explicit return does ensure with explicit return -Crystal::Repl::Interpreter - autocast - autocasts integer var to integer (#12560) autocasts integer var to integer (#12560) - autocasts int in multidispatch autocasts int in multidispatch - autocasts number literal to integer autocasts number literal to integer - autocasts symbol to enum in ivar initializer (#12216) autocasts symbol to enum in ivar initializer (#12216) - autocasts symbol to enum in multidispatch (#11782) autocasts symbol to enum in multidispatch (#11782) - autocasts float32 var to float64 (#12560) autocasts float32 var to float64 (#12560) - autocasts number literal to float autocasts number literal to float - autocasts symbol to enum autocasts symbol to enum - autocasts integer var to float (#12560) autocasts integer var to float (#12560) -Semantic: while - finds all while cond assign targets in expressions (#10350) finds all while cond assign targets in expressions (#10350) - types while ((true)) as NoReturn types while ((true)) as NoReturn - marks variable as nil if breaking before assigning to it in an endless loop (2) marks variable as nil if breaking before assigning to it in an endless loop (2) - uses type at end of endless while if variable is reassigned, but not before first break (2) uses type at end of endless while if variable is reassigned, but not before first break (2) - restricts type after while with not (#4242) restricts type after while with not (#4242) - types endless while with break with value types endless while with break with value - doesn't use type at end of endless while if variable is reassigned (3) doesn't use type at end of endless while if variable is reassigned (3) - doesn't modify variables unchanged in condition and body doesn't modify variables unchanged in condition and body - types while types while - types endless while with multiple breaks with value types endless while with multiple breaks with value - types variable as nilable if raise before assign types variable as nilable if raise before assign - types while with break without value types while with break without value - finds all while cond assign targets in expressions (4) finds all while cond assign targets in expressions (4) - types while with assignment types while with assignment - types while true as NoReturn types while true as NoReturn - types while with multiple breaks with value types while with multiple breaks with value - doesn't fail on nested conditionals inside typeof condition doesn't fail on nested conditionals inside typeof condition - marks variable as nil if breaking before assigning to it in an endless loop marks variable as nil if breaking before assigning to it in an endless loop - types while with && (#1425) types while with && (#1425) - doesn't type var as nilable after break inside rescue doesn't type var as nilable after break inside rescue - doesn't restrict type after while if there's a break (#4242) doesn't restrict type after while if there's a break (#4242) - doesn't use type at end of endless while if variable is reassigned (2) doesn't use type at end of endless while if variable is reassigned (2) - finds all while cond assign targets in expressions (5) finds all while cond assign targets in expressions (5) - uses var type inside while if endless loop (2) uses var type inside while if endless loop (2) - types while (true) as NoReturn types while (true) as NoReturn - doesn't use type at end of endless while if variable is reassigned doesn't use type at end of endless while if variable is reassigned - doesn't fail on Expressions condition (2) doesn't fail on Expressions condition (2) - uses type at end of endless while if variable is reassigned, but not before first break uses type at end of endless while if variable is reassigned, but not before first break - types endless while with break without value types endless while with break without value - finds all while cond assign targets in expressions (3) finds all while cond assign targets in expressions (3) - restricts type after while (#4242) restricts type after while (#4242) - finds all while cond assign targets in expressions (6) finds all while cond assign targets in expressions (6) - types while with assignment and call types while with assignment and call - finds while cond assign target in Not (#10345) finds while cond assign target in Not (#10345) - types while with break with value types while with break with value - rebinds condition variable after while body (#6158) rebinds condition variable after while body (#6158) - doesn't fail on Expressions condition (1) doesn't fail on Expressions condition (1) - reports break cannot be used outside a while reports break cannot be used outside a while - restricts type after `while` with `not` and `and` (#4242) restricts type after `while` with `not` and `and` (#4242) - doesn't fail on new variables inside typeof condition doesn't fail on new variables inside typeof condition - types while with assignment and && types while with assignment and && - finds all while cond assign targets in expressions (2) finds all while cond assign targets in expressions (2) - reports next cannot be used outside a while reports next cannot be used outside a while - doesn't modify var's type before while doesn't modify var's type before while - uses var type inside while if endless loop uses var type inside while if endless loop -Normalize: array literal - normalizes non-empty without of, with splat only normalizes non-empty without of, with splat only - normalizes non-empty with of normalizes non-empty with of - normalizes non-empty with of, with splat normalizes non-empty with of, with splat - hoists complex element expressions, array-like hoists complex element expressions, array-like - hoists complex element expressions, with splat hoists complex element expressions, with splat - hoists complex element expressions hoists complex element expressions - normalizes non-empty without of, with splat normalizes non-empty without of, with splat - normalizes empty with of normalizes empty with of - hoists complex element expressions, array-like generic hoists complex element expressions, array-like generic - normalizes non-empty without of normalizes non-empty without of -read_file - with relative path - reads file (doesn't exist) reads file (doesn't exist) - reads file (exists) reads file (exists) - with absolute path - reads file (exists) reads file (exists) - reads file (doesn't exist) reads file (doesn't exist) -Code gen: lib - allows passing type to LibC if it has a converter with to_unsafe allows passing type to LibC if it has a converter with to_unsafe - get fun field from union (#672) get fun field from union (#672) get fun field from union (#672) get fun field from union (#672) get fun field from union (#672) get fun field from union (#672) get fun field from union (#672) get fun field from union (#672) get fun field from union (#672) get fun field from union (#672) - call to void function call to void function - passes nil to varargs (#1570) passes nil to varargs (#1570) - get fun field from struct (#672) get fun field from struct (#672) get fun field from struct (#672) get fun field from struct (#672) get fun field from struct (#672) get fun field from struct (#672) get fun field from struct (#672) get fun field from struct (#672) get fun field from struct (#672) get fun field from struct (#672) - allows passing type to LibC if it has a converter with to_unsafe (bug) allows passing type to LibC if it has a converter with to_unsafe (bug) - allows setting/getting external variable as function pointer allows setting/getting external variable as function pointer - passes int as another float type in literal passes int as another float type in literal - uses static array in lib extern (#5688) uses static array in lib extern (#5688) - can use tuple as fun return can use tuple as fun return can use tuple as fun return can use tuple as fun return can use tuple as fun return can use tuple as fun return can use tuple as fun return can use tuple as fun return can use tuple as fun return can use tuple as fun return - allows invoking out with underscore allows invoking out with underscore - codegens lib var set and get codegens lib var set and get - can use enum as fun return can use enum as fun return - casts C fun to Crystal proc when accessing instance var (#2515) casts C fun to Crystal proc when accessing instance var (#2515) - doesn't crash when casting -1 to UInt32 (#3594) doesn't crash when casting -1 to UInt32 (#3594) - refers to lib type (#960) refers to lib type (#960) - can use enum as fun argument can use enum as fun argument - doesn't crash with nil and varargs (#4414) doesn't crash with nil and varargs (#4414) -Semantic: return - types return if true types return if true - can use free var in return type (#2492) can use free var in return type (#2492) - infers return type with many returns (2) infers return type with many returns (2) - flattens splats inside multiple return values flattens splats inside multiple return values - can use type var as return type (#1226) can use type var as return type (#1226) - can use type var as return type with an inherited generic class can use type var as return type with an inherited generic class - types bug (#1823) types bug (#1823) - can use type var as return type with an included generic module can use type var as return type with an included generic module - can use non-type free var in return type (2) (#6543) can use non-type free var in return type (2) (#6543) - infers return type with many returns (1) infers return type with many returns (1) - can use non-type free var in return type (#6543) can use non-type free var in return type (#6543) - errors if non-type free var cannot be inferred errors if non-type free var cannot be inferred - doesn't confuse return type from base class doesn't confuse return type from base class - allows nilable return type to match subclasses (#1735) allows nilable return type to match subclasses (#1735) - infers return type infers return type - forms a tuple from multiple return values forms a tuple from multiple return values - allows returning NoReturn instead of the wanted type allows returning NoReturn instead of the wanted type - errors on return in top level errors on return in top level -Codegen: special vars - works lazily works lazily works lazily works lazily works lazily works lazily works lazily works lazily works lazily works lazily - codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) codegens $~ with nilable (2) - preserves special vars if initialized inside block (#2194) preserves special vars if initialized inside block (#2194) - codegens after block 2 codegens after block 2 - codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block codegens in block with nested block - codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) codegens $? with nilable (1) - allows with struct allows with struct - codegens after block codegens after block codegens after block codegens after block codegens after block codegens after block codegens after block codegens after block codegens after block codegens after block - allows with primitive allows with primitive - codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) codegens $? with nilable (2) - codegens with default argument codegens with default argument - codegens $~ codegens $~ - codegens in block codegens in block codegens in block codegens in block codegens in block codegens in block codegens in block codegens in block codegens in block codegens in block - codegens $~ two levels codegens $~ two levels - codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) codegens $~ with nilable (1) - preserves special vars in macro expansion with call with default arguments (#824) preserves special vars in macro expansion with call with default arguments (#824) - codegens $? codegens $? -Code gen: generic class type - doesn't crash on generic type restriction with initially no subtypes (#8411) doesn't crash on generic type restriction with initially no subtypes (#8411) - accesses generic type argument from superclass, macro context accesses generic type argument from superclass, macro context - uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) uses big integer as generic type argument (#2353) - accesses generic type argument from superclass, def context (#10834) accesses generic type argument from superclass, def context (#10834) - invokes super in generic class (#2354) invokes super in generic class (#2354) - declares instance var with virtual T (#1675) declares instance var with virtual T (#1675) - codegens static array size after instantiating codegens static array size after instantiating - accesses generic type argument from superclass, metaclass context accesses generic type argument from superclass, metaclass context - doesn't consider abstract generic instantiation when restricting type (#5190) doesn't consider abstract generic instantiation when restricting type (#5190) - doesn't run generic instance var initializers in formal superclass's context (#4753) doesn't run generic instance var initializers in formal superclass's context (#4753) - allows initializing instance variable in inherited generic type allows initializing instance variable in inherited generic type - runs generic instance var initializers in superclass's metaclass context (2) (#6482) runs generic instance var initializers in superclass's metaclass context (2) (#6482) - doesn't use virtual + in type arguments for Tuple (#2839) doesn't use virtual + in type arguments for Tuple (#2839) - inherited instance var initialize from generic to concrete (#2128) inherited instance var initialize from generic to concrete (#2128) - doesn't crash on generic type restriction with no subtypes (#7583) doesn't crash on generic type restriction with no subtypes (#7583) - inherited instance var initialize from generic to generic to concrete (#2128) inherited instance var initialize from generic to generic to concrete (#2128) - codegens inherited generic class instance var codegens inherited generic class instance var - doesn't use virtual + in type arguments (#2839) doesn't use virtual + in type arguments (#2839) - runs generic instance var initializers in superclass's metaclass context (#4753) runs generic instance var initializers in superclass's metaclass context (#4753) - instantiates generic class with default argument in initialize (#394) instantiates generic class with default argument in initialize (#394) - doesn't use virtual + in type arguments for NamedTuple (#2839) doesn't use virtual + in type arguments for NamedTuple (#2839) - doesn't consider abstract types for including types (#7200) doesn't consider abstract types for including types (#7200) - codegens virtual generic metaclass macro method call codegens virtual generic metaclass macro method call - allows initializing instance variable (#665) allows initializing instance variable (#665) - recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) recomputes two calls that look the same due to generic type being instantiated (#7728) - doesn't override guessed instance var in generic type if already declared in superclass (#9431) doesn't override guessed instance var in generic type if already declared in superclass (#9431) - codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 codegens compile-time interpreted generic int128 -Semantic: NoReturn - computes NoReturn in a lazy way inside if else (#314) (3) computes NoReturn in a lazy way inside if else (#314) (3) - types raise as NoReturn types raise as NoReturn - computes NoReturn in a lazy way inside if then (#314) (2) computes NoReturn in a lazy way inside if then (#314) (2) - assumes if condition's type filters when else is no return assumes if condition's type filters when else is no return - types call to LibC.exit as NoReturn types call to LibC.exit as NoReturn - types union of NoReturn and something else types union of NoReturn and something else - computes NoReturn in a lazy way inside if else (#314) (2) computes NoReturn in a lazy way inside if else (#314) (2) - types union of NoReturns types union of NoReturns - types as NoReturn if followed by one-to-many assignment (#15638) types as NoReturn if followed by one-to-many assignment (#15638) - types as NoReturn even if Nil return type is forced (#3096) types as NoReturn even if Nil return type is forced (#3096) - computes NoReturn in a lazy way inside if then (#314) (3) computes NoReturn in a lazy way inside if then (#314) (3) - computes NoReturn in a lazy way inside if then (#314) (1) computes NoReturn in a lazy way inside if then (#314) (1) - types exception handler as NoReturn if ensure is NoReturn types exception handler as NoReturn if ensure is NoReturn - computes NoReturn in a lazy way inside if else (#314) (5) computes NoReturn in a lazy way inside if else (#314) (5) - types as NoReturn if typeof(exp)'s exp is NoReturn types as NoReturn if typeof(exp)'s exp is NoReturn - computes NoReturn in a lazy way inside if else (#314) (1) computes NoReturn in a lazy way inside if else (#314) (1) - computes NoReturn in a lazy way inside if then (#314) (5) computes NoReturn in a lazy way inside if then (#314) (5) - types with no return even if code follows types with no return even if code follows - computes NoReturn in a lazy way inside if else (#314) (4) computes NoReturn in a lazy way inside if else (#314) (4) - computes NoReturn in a lazy way inside if then (#314) (4) computes NoReturn in a lazy way inside if then (#314) (4) -Semantic: method_missing - does error in method_missing macro with virtual type does error in method_missing macro with virtual type - does error in method_missing if wrong number of params does error in method_missing if wrong number of params - finds method_missing with 'with ... yield' finds method_missing with 'with ... yield' - errors if method_missing expands to multiple methods errors if method_missing expands to multiple methods - does method missing for generic type does method missing for generic type - errors if method_missing expands to an incorrect method errors if method_missing expands to an incorrect method - doesn't look up method_missing in with_yield_scope if call has a receiver (#12097) doesn't look up method_missing in with_yield_scope if call has a receiver (#12097) -Crystal::ABI::AVR - size - for double for double - for struct for struct - for integer for integer - for float for float - for pointer for pointer - for packed struct for packed struct - for array for array - align - for packed struct for packed struct - for double for double - for struct for struct - for array for array - for integer for integer - for float for float - for pointer for pointer - abi_info - struct args over 18 bytes struct args over 18 bytes - int1 int1 - int16 int16 - multiple arguments above registers multiple arguments above registers - returns struct over 8 bytes returns struct over 8 bytes - float float - struct args within 18 bytes struct args within 18 bytes - int64 int64 - double double - int8 int8 - returns struct within 8 bytes returns struct within 8 bytes - multiple arguments multiple arguments - int32 int32 -Normalize: case - normalizes select with assign and bang method normalizes select with assign and bang method - normalizes select with assign and question method normalizes select with assign and question method - normalizes select with else normalizes select with else - normalizes select with assign normalizes select with assign - normalizes select with call normalizes select with call -Code gen: if - codegens if without an else with false codegens if without an else with false - codegens if with an else with true codegens if with an else with true - codegens if value from then codegens if value from then - doesn't crash with if !is_a? using var in then doesn't crash with if !is_a? using var in then - codegen if with union type and then without type codegen if with union type and then without type - codegens if without an else with true codegens if without an else with true - codegens if with virtual codegens if with virtual - codegen if with union type and else without type codegen if with union type and else without type - codegens if with an else with false codegens if with an else with false - codegens if inside def without an else with true codegens if inside def without an else with true - codegen if with nested if that returns codegen if with nested if that returns - codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises codegens if with nested if that raises - codegens if with nil codegens if with nil - codegens if of nilable type in then codegens if of nilable type in then - codegens nested if with var (ssa bug) codegens nested if with var (ssa bug) - codegens if with return and no else codegens if with return and no else - doesn't generate truthy if branch if doesn't need value (bug) doesn't generate truthy if branch if doesn't need value (bug) - codes if with two whiles codes if with two whiles - codegens if with pointer 0x100000000 pointer codegens if with pointer 0x100000000 pointer - codegens if of nilable type in else codegens if of nilable type in else - codegen if inside if codegen if inside if - codegens if with union codegens if with union - doesn't crash with if !var using var in else doesn't crash with if !var using var in else - restricts with || always falsey restricts with || always falsey - codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter codegens if with return in else preserves type filter - codegens #3104 codegens #3104 - codegens if of nilable type in then 2 codegens if of nilable type in then 2 - doesn't crash no NoReturn var (non-true left cond) (#1823) doesn't crash no NoReturn var (non-true left cond) (#1823) - codegens if with return in both branches codegens if with return in both branches - codegens if of nilable type in else 3 codegens if of nilable type in else 3 - doesn't crash no NoReturn var (true left cond) (#1823) doesn't crash no NoReturn var (true left cond) (#1823) - codegens if with int codegens if with int - codegens bug #1729 codegens bug #1729 - considers or truthy/falsey right considers or truthy/falsey right -Crystal::Repl::Interpreter - tuple - interprets tuple metaclass range indexer interprets tuple metaclass range indexer - interprets tuple self interprets tuple self - interprets tuple literal of different types (2) interprets tuple literal of different types (2) - does tuple indexer on union does tuple indexer on union - interprets tuple literal of different types (1) interprets tuple literal of different types (1) - unpacks tuple in block arguments unpacks tuple in block arguments - interprets tuple range indexer interprets tuple range indexer - discards tuple access discards tuple access - interprets tuple range indexer (2) interprets tuple range indexer (2) - interprets tuple metaclass indexer interprets tuple metaclass indexer - discards tuple (#12383) discards tuple (#12383) - extends sign when doing to_i32 extends sign when doing to_i32 - interprets tuple literal and access by known index interprets tuple literal and access by known index -Crystal::Playground::Agent - should send json messages and return inspected value should send json messages and return inspected value -Code gen: experimental - compiles with single string argument compiles with single string argument - errors if missing link arguments errors if missing link arguments - errors if invalid argument type errors if invalid argument type - errors if too many arguments errors if too many arguments - compiles with no argument compiles with no argument -Parser - parses "1_i64" parses "1_i64" - says syntax error on "lib Foo; union Bar:Qux" says syntax error on "lib Foo; union Bar:Qux" - parses "nil?( )" parses "nil?( )" - says syntax error on "case 1; when break; end; end" says syntax error on "case 1; when break; end; end" - parses "lib LibC; enum Foo; A = 1; B; end end" parses "lib LibC; enum Foo; A = 1; B; end end" - says syntax error on "def foo(x : *Int32); end" says syntax error on "def foo(x : *Int32); end" - says syntax error on "{\"a\": 1, \"b\" : 2}" says syntax error on "{\"a\": 1, \"b\" : 2}" - says syntax error on "pointerof(self)" says syntax error on "pointerof(self)" - says syntax error on "def foo(\"bar \#{1} qux\" y); y; end" says syntax error on "def foo(\"bar \#{1} qux\" y); y; end" - parses "def foo(a, &block : self -> self); end" parses "def foo(a, &block : self -> self); end" - parses "def self.-(); end;" parses "def self.-(); end;" - parses "foo &block" parses "foo &block" - parses "def foo(@[Foo] &@block); end" parses "def foo(@[Foo] &@block); end" - parses "case 1; when 2 then /foo/; end" parses "case 1; when 2 then /foo/; end" - parses "def foo(@@offsetof); end" parses "def foo(@@offsetof); end" - sets correct location of tuple type sets correct location of tuple type - parses "call(foo : A, end : B)" parses "call(foo : A, end : B)" - parses "foo.-(1, 2)" parses "foo.-(1, 2)" - parses "property ensure : Int32" parses "property ensure : Int32" - parses "foo.bar = (1).abs" parses "foo.bar = (1).abs" - parses "foo.% 1, 2" parses "foo.% 1, 2" - says syntax error on "A = foo { B = 1 }" says syntax error on "A = foo { B = 1 }" - parses "a.b &=\n1" parses "a.b &=\n1" - says syntax error on "b? = 1" says syntax error on "b? = 1" - parses "@[Foo(\"hello\")]" parses "@[Foo(\"hello\")]" - says syntax error on "def foo(foo instance_sizeof); end" says syntax error on "def foo(foo instance_sizeof); end" - parses "a, b = 1, 2 if 3" parses "a, b = 1, 2 if 3" - parses "%w{one{} two}" parses "%w{one{} two}" - says syntax error on "a = 1, b = 2" says syntax error on "a = 1, b = 2" - parses "lib LibC\nfun getchar\nend" parses "lib LibC\nfun getchar\nend" - parses "{{ 1 // 2 }}" parses "{{ 1 // 2 }}" - parses "__DIR__" parses "__DIR__" - parses "def foo(x @@macro); end" parses "def foo(x @@macro); end" - parses "lib LibC; enum Foo; A\nB; C\nD = 1; end end" parses "lib LibC; enum Foo; A\nB; C\nD = 1; end end" - parses "foo !false" parses "foo !false" - parses "[/ /, / /]" parses "[/ /, / /]" - parses "1 \\\r\n + 2" parses "1 \\\r\n + 2" - parses "foo(z: 0, a: n // 2)" parses "foo(z: 0, a: n // 2)" - parses "call @foo.bar" parses "call @foo.bar" - parses "Foo({X: X, Y: Y})" parses "Foo({X: X, Y: Y})" - parses "a = 1; a *=\n1" parses "a = 1; a *=\n1" - parses "foo x do\nend" parses "foo x do\nend" - says syntax error on "break ^ 1" says syntax error on "break ^ 1" - parses "foo(*bar)" parses "foo(*bar)" - parses "foo % q()" parses "foo % q()" - parses "module Foo ->(x : Bar){} end" parses "module Foo ->(x : Bar){} end" - parses "%q{hello \\n world}" parses "%q{hello \\n world}" - parses "foo(z: 0, a: n ^ 2)" parses "foo(z: 0, a: n ^ 2)" - says syntax error on "1 ... next" says syntax error on "1 ... next" - says syntax error on "offsetof(X, 'c')" says syntax error on "offsetof(X, 'c')" - says syntax error on "def foo(return); end" says syntax error on "def foo(return); end" - says syntax error on "module Foo {|a|a}" says syntax error on "module Foo {|a|a}" - says syntax error on "next ** 1" says syntax error on "next ** 1" - parses "{%\nif 1; 2; end\n%}" parses "{%\nif 1; 2; end\n%}" - parses "def foo(@lib); end" parses "def foo(@lib); end" - parses "puts __DIR__" parses "puts __DIR__" - parses ":&**" parses ":&**" - parses "foo &.each {\n}" parses "foo &.each {\n}" - parses "(foo bar do\nend)" parses "(foo bar do\nend)" - parses "def foo(a, &block); end" parses "def foo(a, &block); end" - says syntax error on "1 foo" says syntax error on "1 foo" - parses "Foo()?" parses "Foo()?" - sets location of enum method sets location of enum method - parses "\"hello \\\r\n world\"" parses "\"hello \\\r\n world\"" - parses "alignof(X)" parses "alignof(X)" - parses "foo.[]=(1, 2)" parses "foo.[]=(1, 2)" - parses "f.x = - 1" parses "f.x = - 1" - parses "class Foo\ndef foo; end; end" parses "class Foo\ndef foo; end; end" - parses "foo &.block[0] = 1" parses "foo &.block[0] = 1" - parses ":~" parses ":~" - says syntax error on "foo { |until| }" says syntax error on "foo { |until| }" - parses "foo %i()" parses "foo %i()" - says syntax error on "break.as(Int32)" says syntax error on "break.as(Int32)" - parses "case {1}\nin {_}; 2; end" parses "case {1}\nin {_}; 2; end" - parses "a = 1" parses "a = 1" - parses "module Foo {1} end" parses "module Foo {1} end" - parses "foo%r" parses "foo%r" - parses "1 ... 2" parses "1 ... 2" - says syntax error on "def foo(module); end" says syntax error on "def foo(module); end" - parses ":[]?" parses ":[]?" - parses "{% begin %}%r(\\A){% end %}" parses "{% begin %}%r(\\A){% end %}" - says syntax error on "class Foo{1}" says syntax error on "class Foo{1}" - parses "foo.is_a?(Foo | Bar)" parses "foo.is_a?(Foo | Bar)" - parses "Foo(Bar())" parses "Foo(Bar())" - parses "return if true" parses "return if true" - parses "def foo(select foo); end" parses "def foo(select foo); end" - parses "{A::B => 1, C::D => 2}" parses "{A::B => 1, C::D => 2}" - parses "[] of ->\n" parses "[] of ->\n" - says syntax error on "lib Foo[1]" says syntax error on "lib Foo[1]" - parses "def -; end;" parses "def -; end;" - parses "def foo(case foo); end" parses "def foo(case foo); end" - says syntax error on "a.b {}, c = 1" says syntax error on "a.b {}, c = 1" - parses "->foo(Void*)" parses "->foo(Void*)" - parses "1+2*3" parses "1+2*3" - says syntax error on "lib Foo; union Bar->(x : Qux){}" says syntax error on "lib Foo; union Bar->(x : Qux){}" - parses "def <; end;" parses "def <; end;" - parses "foo(a: n &- 2)" parses "foo(a: n &- 2)" - sets correct location of named tuple type sets correct location of named tuple type - parses "def foo(@@sizeof); end" parses "def foo(@@sizeof); end" - parses "n & 2" parses "n & 2" - parses "lib LibC; type A = B**; end" parses "lib LibC; type A = B**; end" - parses "property yield : Int32" parses "property yield : Int32" - parses "class Foo 'a' end" parses "class Foo 'a' end" - says syntax error on "1 unless next" says syntax error on "1 unless next" - parses "def foo(offsetof foo); end" parses "def foo(offsetof foo); end" - says syntax error on "next >> 1" says syntax error on "next >> 1" - says syntax error on "module Foo%w()" says syntax error on "module Foo%w()" - parses "return 1.bar do\nend" parses "return 1.bar do\nend" - parses "foo(n < 2)" parses "foo(n < 2)" - says syntax error on "annotation Foo%()" says syntax error on "annotation Foo%()" - parses "1\n-2" parses "1\n-2" - parses "foo = 1; ->foo.<(Int32)" parses "foo = 1; ->foo.<(Int32)" - parses "a = 1; a <<=\n1" parses "a = 1; a <<=\n1" - parses "n >= 2" parses "n >= 2" - parses "def foo(@@in); end" parses "def foo(@@in); end" - parses "def foo(x @@require); end" parses "def foo(x @@require); end" - parses "'a'" parses "'a'" - says syntax error on "1 2" says syntax error on "1 2" - parses "{A: 1, B: 2}" parses "{A: 1, B: 2}" - says syntax error on "def foo *y; 1; end" says syntax error on "def foo *y; 1; end" - parses "foo = 1; ->foo.bar(Int32)" parses "foo = 1; ->foo.bar(Int32)" - says syntax error on "enum Foo%w()" says syntax error on "enum Foo%w()" - parses "foo(z: 0, a: n <= 2)" parses "foo(z: 0, a: n <= 2)" - parses "foo z: out x; x" parses "foo z: out x; x" - parses "def foo(x @@struct); end" parses "def foo(x @@struct); end" - parses "module Foo include Bar end" parses "module Foo include Bar end" - parses "def |(); end" parses "def |(); end" - parses "foo = 1; ->foo.>=(Int32)" parses "foo = 1; ->foo.>=(Int32)" - says syntax error on "enum Foo {|a|a}" says syntax error on "enum Foo {|a|a}" - parses "[1, 2]" parses "[1, 2]" - sets correct location of vars in C struct sets correct location of vars in C struct - parses "foo.^ do end" parses "foo.^ do end" - parses "foo.*(1, 2)" parses "foo.*(1, 2)" - parses "@foo" parses "@foo" - parses "foo.bar 1, 2" parses "foo.bar 1, 2" - parses "n < 2" parses "n < 2" - parses "->Foo.>=(Int32)" parses "->Foo.>=(Int32)" - parses "def foo(@[Foo] @var); end" parses "def foo(@[Foo] @var); end" - parses "def foo(self foo); end" parses "def foo(self foo); end" - parses "->Foo.|(Int32)" parses "->Foo.|(Int32)" - parses "foo(0, n + 2)" parses "foo(0, n + 2)" - parses "struct Foo :Bar end" parses "struct Foo :Bar end" - says syntax error on "1 ? : 2 : 3" says syntax error on "1 ? : 2 : 3" - parses "foo &->bar" parses "foo &->bar" - parses "def self.|; end;" parses "def self.|; end;" - parses "lib LibC\nfun getch = \"get.char\"(x : Int32)\nend" parses "lib LibC\nfun getch = \"get.char\"(x : Int32)\nend" - says syntax error on "annotation Foo{1}" says syntax error on "annotation Foo{1}" - parses "when : Int32" parses "when : Int32" - parses "n << 2" parses "n << 2" - parses "foo = 1; ->foo.[]=(Int32)" parses "foo = 1; ->foo.[]=(Int32)" - says syntax error on "return - 1" says syntax error on "return - 1" - parses "%r(\\/)" parses "%r(\\/)" - parses "lib LibC\nfun getchar(a : Int, b : Float)\nend" parses "lib LibC\nfun getchar(a : Int, b : Float)\nend" - parses "class Foo; end\nwhile true; end" parses "class Foo; end\nwhile true; end" - parses "foo(n << 2)" parses "foo(n << 2)" - parses "puts {{1}}" parses "puts {{1}}" - parses "def foo(&@block); end" parses "def foo(&@block); end" - says syntax error on "a.[]() = 1" says syntax error on "a.[]() = 1" - parses "f ->{ a do\n end\n }" parses "f ->{ a do\n end\n }" - says syntax warning on "def foo(bar!); end" says syntax warning on "def foo(bar!); end" - says syntax error on "case x; when 1, _; end" says syntax error on "case x; when 1, _; end" - parses "1.[](2)" parses "1.[](2)" - parses "1 !~ 2" parses "1 !~ 2" - sets the correct location for MacroExpressions in a MacroIf sets the correct location for MacroExpressions in a MacroIf - parses "macro foo; bar class: 1; end" parses "macro foo; bar class: 1; end" - parses "{[] of Foo, self.foo}" parses "{[] of Foo, self.foo}" - parses "a = 1; a += 1" parses "a = 1; a += 1" - says syntax error on "<<-FOO\n1\nFOO.bar" says syntax error on "<<-FOO\n1\nFOO.bar" - parses "foo(a: n * 2)" parses "foo(a: n * 2)" - parses "macro foo(\na = 0\n)\nend" parses "macro foo(\na = 0\n)\nend" - parses "Foo({X, Y,})" parses "Foo({X, Y,})" - parses "asm(\"bl trap\" :::: \"unwind\")" parses "asm(\"bl trap\" :::: \"unwind\")" - parses "<<-HERE1; <<-HERE2\nHERE1\nHERE2" parses "<<-HERE1; <<-HERE2\nHERE1\nHERE2" - parses "foo.===(1, 2)" parses "foo.===(1, 2)" - parses "foo.!= do end" parses "foo.!= do end" - parses "foo %Q" parses "foo %Q" - parses "lib LibC; struct Foo; {{ 1 }}; end; end" parses "lib LibC; struct Foo; {{ 1 }}; end; end" - parses "foo = 1; ->foo.foo" parses "foo = 1; ->foo.foo" - says syntax error on "return .. 1" says syntax error on "return .. 1" - parses "->() : Int32 { }" parses "->() : Int32 { }" - says syntax error on "fun foo(Int32); end" says syntax error on "fun foo(Int32); end" - parses "foo { |(_, c, )| c }" parses "foo { |(_, c, )| c }" - parses "foo Bar { 1 }" parses "foo Bar { 1 }" - says syntax error on "next | 1" says syntax error on "next | 1" - parses "->Foo.<<(Int32)" parses "->Foo.<<(Int32)" - parses "a = 1; a[2] &&= 3" parses "a = 1; a[2] &&= 3" - parses "foo &.@bar" parses "foo &.@bar" - parses "def foo(x @out); end" parses "def foo(x @out); end" - parses "def : Int32" parses "def : Int32" - parses "foo(1, **bar, &block)" parses "foo(1, **bar, &block)" - parses "case 1\nwhen 1\n2\nend" parses "case 1\nwhen 1\n2\nend" - parses "def foo(a, b = a); end" parses "def foo(a, b = a); end" - parses "@[Foo]" parses "@[Foo]" - parses "next *{1, 2}" parses "next *{1, 2}" - says syntax error on "case x; when 'a'; 2; when 'a'; end" says syntax error on "case x; when 'a'; 2; when 'a'; end" - parses "(a;\nb)" parses "(a;\nb)" - parses "my_def def foo\nloop do\nend\nend" parses "my_def def foo\nloop do\nend\nend" - parses "def foo(@end); end" parses "def foo(@end); end" - says syntax error on "class Foo%()" says syntax error on "class Foo%()" - parses "Foo.foo(count: 3).bar { }" parses "Foo.foo(count: 3).bar { }" - says syntax error on "def foo(foo lib); end" says syntax error on "def foo(foo lib); end" - parses "x = 1; ->{ x }" parses "x = 1; ->{ x }" - says syntax error on "foo { |(def)| }" says syntax error on "foo { |(def)| }" - parses "enum Foo; A = 1\ndef self.foo; 1; end\nend" parses "enum Foo; A = 1\ndef self.foo; 1; end\nend" - parses "foo[\nfoo[\n1\n]\n]" parses "foo[\nfoo[\n1\n]\n]" - parses "foo(&.is_a?(T))" parses "foo(&.is_a?(T))" - parses "a.b %=\n1" parses "a.b %=\n1" - says syntax error on "case return; when 1; end; end" says syntax error on "case return; when 1; end; end" - sets correct location of trailing ensure sets correct location of trailing ensure - parses "foo.=~" parses "foo.=~" - parses "Foo{\"x\" => \"y\"}" parses "Foo{\"x\" => \"y\"}" - parses "struct Foo ->{} end" parses "struct Foo ->{} end" - parses "class Foo(T1); end" parses "class Foo(T1); end" - parses "def foo; x { |a, *b| b }; end" parses "def foo; x { |a, *b| b }; end" - says syntax error on "case next; when 1; end; end" says syntax error on "case next; when 1; end; end" - sets correct location of implicit tuple literal of multi-return sets correct location of implicit tuple literal of multi-return - says syntax warning on "def foo(bar?); end" says syntax warning on "def foo(bar?); end" - parses "{% begin %}%[ %s ]{% end %}" parses "{% begin %}%[ %s ]{% end %}" - gets corrects end location for var gets corrects end location for var - parses "foo(0, n | 2)" parses "foo(0, n | 2)" - says syntax error on "foo { |typeof| }" says syntax error on "foo { |typeof| }" - says syntax error on " [1, 2, 3 end" says syntax error on " [1, 2, 3 end" - says syntax error on "self, x = 1, 2" says syntax error on "self, x = 1, 2" - parses "a.foo, *a.bar = 1" parses "a.foo, *a.bar = 1" - parses "a = 1; a *= 1" parses "a = 1; a *= 1" - parses "def foo(x @return); end" parses "def foo(x @return); end" - parses "module Foo ->{} end" parses "module Foo ->{} end" - says syntax error on "def foo=(a = 1, b = 2); end" says syntax error on "def foo=(a = 1, b = 2); end" - single splats inside container literals - parses "Set {*1, 2, *3}" parses "Set {*1, 2, *3}" - parses "case 1\nwhen {*2}; 3; end" parses "case 1\nwhen {*2}; 3; end" - parses "x = {*1}" parses "x = {*1}" - parses "[*1, *2]" parses "[*1, *2]" - parses "[*1, 2]" parses "[*1, 2]" - parses "[1, *2, 3, *4, 5]" parses "[1, *2, 3, *4, 5]" - says syntax error on "{*1 => 2}" says syntax error on "{*1 => 2}" - parses "[*1]" parses "[*1]" - parses "{*1}" parses "{*1}" - says syntax error on "{1 => 2, *3}" says syntax error on "{1 => 2, *3}" - says syntax error on "case {1}\nwhen {*2}; 3; end" says syntax error on "case {1}\nwhen {*2}; 3; end" - parses "{*1 * 2}" parses "{*1 * 2}" - parses "{*1, 2}" parses "{*1, 2}" - parses "{1, *2, 3, *4, 5}" parses "{1, *2, 3, *4, 5}" - says syntax error on "{*a: 1}" says syntax error on "{*a: 1}" - parses "[1, *2]" parses "[1, *2]" - says syntax error on "{a: 1, *2}" says syntax error on "{a: 1, *2}" - parses "{1, *2}" parses "{1, *2}" - says syntax error on "case {*1}\nwhen {2}; 3; end" says syntax error on "case {*1}\nwhen {2}; 3; end" - parses "{*1, *2}" parses "{*1, *2}" - parses "[*[*[1]], *[2]]" parses "[*[*[1]], *[2]]" - parses "Set {*{1} * 2}" parses "Set {*{1} * 2}" - parses "[*1 ** 2]" parses "[*1 ** 2]" - says syntax error on "Foo(x: X\n,y: Y)" says syntax error on "Foo(x: X\n,y: Y)" - parses "foo.+ 1, 2" parses "foo.+ 1, 2" - parses "foo.bar [1]" parses "foo.bar [1]" - says syntax error on "foo(1\n,2)" says syntax error on "foo(1\n,2)" - parses "foo(a: n << 2)" parses "foo(a: n << 2)" - parses "case 1\nwhen .!()\n2\nend" parses "case 1\nwhen .!()\n2\nend" - parses "foo out x; x" parses "foo out x; x" - parses "foo 1, 2" parses "foo 1, 2" - says syntax error on "{1, ->{ |x| x } }" says syntax error on "{1, ->{ |x| x } }" - parses "*a = 1" parses "*a = 1" - says syntax error on "<<-HEREDOC" says syntax error on "<<-HEREDOC" - says syntax error on "foo { |fun| }" says syntax error on "foo { |fun| }" - says syntax error on "foo { |module| }" says syntax error on "foo { |module| }" - parses "x : *T -> R" parses "x : *T -> R" - parses "1 == 2" parses "1 == 2" - says syntax error on "lib Foo%w()" says syntax error on "lib Foo%w()" - parses "->Foo.%(Int32)" parses "->Foo.%(Int32)" - parses "def foo(sizeof foo); end" parses "def foo(sizeof foo); end" - parses "Foo({x: X})" parses "Foo({x: X})" - parses "foo(&.bar.baz)" parses "foo(&.bar.baz)" - parses "foo = 1; foo a: 1" parses "foo = 1; foo a: 1" - says syntax error on "asm(\"nop\" :::: \"\#{volatile}\")" says syntax error on "asm(\"nop\" :::: \"\#{volatile}\")" - parses "def foo(x @pointerof); end" parses "def foo(x @pointerof); end" - parses "foo %x()" parses "foo %x()" - parses "offsetof(X, @a)" parses "offsetof(X, @a)" - parses "2.3_f32" parses "2.3_f32" - parses "a = 1; a ^=\n1" parses "a = 1; a ^=\n1" - parses "instance_alignof(X)" parses "instance_alignof(X)" - parses "case 1\nin Foo(Int32); 2; end" parses "case 1\nin Foo(Int32); 2; end" - parses "foo = 1; ->foo.>>(Int32)" parses "foo = 1; ->foo.>>(Int32)" - parses "a : Foo*" parses "a : Foo*" - parses "foo./ do end" parses "foo./ do end" - parses "def foo(@@break); end" parses "def foo(@@break); end" - parses "/foo/m" parses "/foo/m" - parses "def foo; a = 1; x { a }; end" parses "def foo; a = 1; x { a }; end" - parses "{%\n2 if 1; 3\n%}" parses "{%\n2 if 1; 3\n%}" - parses "foo &.+(2)" parses "foo &.+(2)" - says syntax error on "A = foo(B = 1)" says syntax error on "A = foo(B = 1)" - says syntax error on "enum Foo : Int32 {|a|a}" says syntax error on "enum Foo : Int32 {|a|a}" - parses "[1,\n 2,]" parses "[1,\n 2,]" - gets correct location after macro with yield gets correct location after macro with yield - parses "def foo; with a yield 1; end" parses "def foo; with a yield 1; end" - parses "def foo(@[Foo] var); end" parses "def foo(@[Foo] var); end" - parses "{..2}" parses "{..2}" - parses "foo(a: n <= 2)" parses "foo(a: n <= 2)" - parses "return 1, *2" parses "return 1, *2" - parses "break *{1, 2}" parses "break *{1, 2}" - says syntax warning on "foo do |(bar?)|\nend" says syntax warning on "foo do |(bar?)|\nend" - parses "..2" parses "..2" - parses "{% unless 1; 2; end; 3 %}" parses "{% unless 1; 2; end; 3 %}" - parses "%w{one\ttwo}" parses "%w{one\ttwo}" - parses "foo(n ^ 2)" parses "foo(n ^ 2)" - says syntax error on "return >= 1" says syntax error on "return >= 1" - says syntax error on "lib Foo; struct Bar%()" says syntax error on "lib Foo; struct Bar%()" - parses "def self.-; end;" parses "def self.-; end;" - parses "def foo(\nvar\n); end" parses "def foo(\nvar\n); end" - parses "{1, 2, 3}" parses "{1, 2, 3}" - parses "def foo(x)\n x\nend; foo = 1; b = 2; foo -b" parses "def foo(x)\n x\nend; foo = 1; b = 2; foo -b" - says syntax error on "1 until 3" says syntax error on "1 until 3" - parses "foo(0, n < 2)" parses "foo(0, n < 2)" - says syntax error on "foo &.[] 0 =(1)" says syntax error on "foo &.[] 0 =(1)" - parses "break 1" parses "break 1" - parses "Foo(x: U)" parses "Foo(x: U)" - parses "foo bar?" parses "foo bar?" - says syntax error on "1 .. next" says syntax error on "1 .. next" - parses "->Foo.^(Int32)" parses "->Foo.^(Int32)" - says syntax error on "def foo(*x, **x); end" says syntax error on "def foo(*x, **x); end" - parses "annotation Foo::Bar\n\nend" parses "annotation Foo::Bar\n\nend" - parses "*a, b = 1, 2, 3, 4" parses "*a, b = 1, 2, 3, 4" - says syntax error on "{one: :two, three: :four} of Symbol => Symbol" says syntax error on "{one: :two, three: :four} of Symbol => Symbol" - sets correct location of private method in enum sets correct location of private method in enum - parses "{A::B}" parses "{A::B}" - parses "def foo; a; end" parses "def foo; a; end" - parses "enum Foo; {% if 1 %}2{% end %}; end" parses "enum Foo; {% if 1 %}2{% end %}; end" - says syntax error on "foo { |nil| }" says syntax error on "foo { |nil| }" - says syntax error on "enum Foo : Int32'a'" says syntax error on "enum Foo : Int32'a'" - parses "begin; 1; rescue ex; 2; end" parses "begin; 1; rescue ex; 2; end" - parses "case {1, 2}\nwhen {3, 4}\n5\nend" parses "case {1, 2}\nwhen {3, 4}\n5\nend" - parses "a = 1; (a)/b" parses "a = 1; (a)/b" - parses "->Foo.-(Int32)" parses "->Foo.-(Int32)" - parses "-1.0_f32" parses "-1.0_f32" - parses "def self.*; end;" parses "def self.*; end;" - parses "%Q{hello \\n world}" parses "%Q{hello \\n world}" - parses "foo.==" parses "foo.==" - parses "fun : Int32" parses "fun : Int32" - parses "[\n1\n]" parses "[\n1\n]" - parses "a = 1; a &=\n1" parses "a = 1; a &=\n1" - parses "+1.0_f32" parses "+1.0_f32" - parses "def foo(@asm); end" parses "def foo(@asm); end" - parses "foo(z: 0, a: n == 2)" parses "foo(z: 0, a: n == 2)" - parses "1 +2" parses "1 +2" - parses "def self.>=(); end;" parses "def self.>=(); end;" - says syntax error on "1 as Bar" says syntax error on "1 as Bar" - parses "enum Foo; protected def foo; 1; end; end" parses "enum Foo; protected def foo; 1; end; end" - parses "{[] of Foo, Bar::Baz + 2}" parses "{[] of Foo, Bar::Baz + 2}" - says syntax error on "def foo(next); end" says syntax error on "def foo(next); end" - parses "def !=(); end;" parses "def !=(); end;" - parses "@[Foo::Bar]" parses "@[Foo::Bar]" - says syntax error on "lib Foo%()" says syntax error on "lib Foo%()" - says syntax error on "return 1 foo" says syntax error on "return 1 foo" - parses "{% if 1\n x\nend %}" parses "{% if 1\n x\nend %}" - parses "break 1 if true" parses "break 1 if true" - says syntax error on "macro !;end" says syntax error on "macro !;end" - parses "{1 => 2 / 3}" parses "{1 => 2 / 3}" - sets args_in_brackets to true for `a[b]` sets args_in_brackets to true for `a[b]` - parses "asm(\"nop\" : \"a\"(0) : \"b\"(1))" parses "asm(\"nop\" : \"a\"(0) : \"b\"(1))" - says syntax error on "foo { |(break)| }" says syntax error on "foo { |(break)| }" - parses "property do : Int32" parses "property do : Int32" - says syntax error on "return << 1" says syntax error on "return << 1" - parses "foo\n\n .bar" parses "foo\n\n .bar" - parses "foo unless 3" parses "foo unless 3" - says syntax error on "a = return" says syntax error on "a = return" - parses "while true; end;" parses "while true; end;" - parses "->Foo.[]=(Int32)" parses "->Foo.[]=(Int32)" - says syntax warning on "def foo(foo bar?); end" says syntax warning on "def foo(foo bar?); end" - parses "require \"foo\"" parses "require \"foo\"" - says syntax error on "struct Foo{1}" says syntax error on "struct Foo{1}" - parses "foo = 1; ->foo.<<(Int32)" parses "foo = 1; ->foo.<<(Int32)" - says syntax error on "class Foo < Bar:Qux" says syntax error on "class Foo < Bar:Qux" - says syntax error on "foo { |select| }" says syntax error on "foo { |select| }" - parses "def foo(x, *, y, &); 1; end" parses "def foo(x, *, y, &); 1; end" - parses "lib LibC\nfun getchar(...)\nend" parses "lib LibC\nfun getchar(...)\nend" - says syntax error on "case 1; when next; end; end" says syntax error on "case 1; when next; end; end" - parses "foo +1" parses "foo +1" - parses "foo(0, n >= 2)" parses "foo(0, n >= 2)" - parses "def +; end;" parses "def +; end;" - says syntax error on "@[Foo(\"\": 1)]" says syntax error on "@[Foo(\"\": 1)]" - parses "%w{\\{one}" parses "%w{\\{one}" - parses "(bar {})" parses "(bar {})" - parses "Foo(T, 1, U)" parses "Foo(T, 1, U)" - parses "macro foo(a, @[Foo] var);end" parses "macro foo(a, @[Foo] var);end" - parses "n / 2" parses "n / 2" - says syntax error on "lib Foo; struct Bar%x()" says syntax error on "lib Foo; struct Bar%x()" - says syntax error on "def foo(foo def); end" says syntax error on "def foo(foo def); end" - parses "{[] of Foo, ::Bar::Baz.new}" parses "{[] of Foo, ::Bar::Baz.new}" - says syntax error on "struct Foo {|a|a}" says syntax error on "struct Foo {|a|a}" - parses "def foo(x @@case); end" parses "def foo(x @@case); end" - parses "%q{hello \#{foo} world}" parses "%q{hello \#{foo} world}" - parses "foo = 1; ->foo.=~(Int32)" parses "foo = 1; ->foo.=~(Int32)" - parses "class Foo %() end" parses "class Foo %() end" - says syntax error on "struct Foo->{}" says syntax error on "struct Foo->{}" - parses "a; if / /\n/ /\nelsif / /\n/ /\nend" parses "a; if / /\n/ /\nelsif / /\n/ /\nend" - says syntax error on "lib Foo%end" says syntax error on "lib Foo%end" - parses "puts ::foo" parses "puts ::foo" - parses "foo 1, a: 1, b: 2" parses "foo 1, a: 1, b: 2" - parses "Int" parses "Int" - gets correct location with - (#1558) gets correct location with - (#1558) - parses "a = 1; a /=\n1" parses "a = 1; a /=\n1" - says syntax warning on "foo do |foo, bar?|\nend" says syntax warning on "foo do |foo, bar?|\nend" - says syntax error on "select\nwhen 1\n2\nend" says syntax error on "select\nwhen 1\n2\nend" - parses "extend self" parses "extend self" - says syntax error on "case 1\nwhen .+=(2)" says syntax error on "case 1\nwhen .+=(2)" - parses "def foo(x @struct); end" parses "def foo(x @struct); end" - parses "foo { |(_, c)| c }" parses "foo { |(_, c)| c }" - parses "enum : Int32" parses "enum : Int32" - parses "do : Int32" parses "do : Int32" - says syntax error on "macro foo; {% foo = 1 }; end" says syntax error on "macro foo; {% foo = 1 }; end" - says syntax error on "def foo(with); end" says syntax error on "def foo(with); end" - says syntax error on "def foo(foo private); end" says syntax error on "def foo(foo private); end" - says syntax error on "class Foo(T, T); end" says syntax error on "class Foo(T, T); end" - parses "foo.bar.as(Bar)" parses "foo.bar.as(Bar)" - parses "def self./(); end;" parses "def self./(); end;" - parses "{% begin %}%q< %s >{% end %}" parses "{% begin %}%q< %s >{% end %}" - parses "lib LibC; {{ 1 }}; end" parses "lib LibC; {{ 1 }}; end" - parses "def self.<=; end;" parses "def self.<=; end;" - parses "1 ** 2" parses "1 ** 2" - parses "foo(z: 0, a: n >= 2)" parses "foo(z: 0, a: n >= 2)" - parses "1.[]=(2, 3)" parses "1.[]=(2, 3)" - parses "foo = 1; ->foo.%(Int32)" parses "foo = 1; ->foo.%(Int32)" - parses "{% begin %}%w{ %s }{% end %}" parses "{% begin %}%w{ %s }{% end %}" - says syntax error on "def foo(foo asm); end" says syntax error on "def foo(foo asm); end" - says syntax error on "'a' foo" says syntax error on "'a' foo" - says syntax error on "def foo(foo case); end" says syntax error on "def foo(foo case); end" - parses "x = 1; foo x {\n}" parses "x = 1; foo x {\n}" - parses "a : Foo[12]" parses "a : Foo[12]" - says syntax error on "self = 1" says syntax error on "self = 1" - parses "property case : Int32" parses "property case : Int32" - says syntax error on "A = begin; 1; rescue; B = 1; end" says syntax error on "A = begin; 1; rescue; B = 1; end" - says syntax error on "return[]" says syntax error on "return[]" - parses "foo = 1; ->foo.foo?" parses "foo = 1; ->foo.foo?" - parses "f.x = Foo.new" parses "f.x = Foo.new" - says syntax error on "enum Foo:Qux" says syntax error on "enum Foo:Qux" - parses "return {1 => 2}" parses "return {1 => 2}" - parses "def self.!~; end;" parses "def self.!~; end;" - parses "macro foo;bar{% for x in y %}\\ \n body{% end %}baz;end" parses "macro foo;bar{% for x in y %}\\ \n body{% end %}baz;end" - parses "Foo(_)" parses "Foo(_)" - says syntax error on "foo[return]" says syntax error on "foo[return]" - says syntax error on "next === 1" says syntax error on "next === 1" - says syntax error on "enum Foo : Int32->(x : Qux){}" says syntax error on "enum Foo : Int32->(x : Qux){}" - parses "macro foo(x = __LINE__);end" parses "macro foo(x = __LINE__);end" - parses "property protected : Int32" parses "property protected : Int32" - parses "class Foo {1} end" parses "class Foo {1} end" - says syntax error on "def foo(in); end" says syntax error on "def foo(in); end" - parses "`foo`" parses "`foo`" - parses "foo.[0] = 1" parses "foo.[0] = 1" - parses "/foo/i" parses "/foo/i" - parses "property typeof : Int32" parses "property typeof : Int32" - parses "foo.!=(1, 2) { 3 }" parses "foo.!=(1, 2) { 3 }" - parses "def foo(x @@def); end" parses "def foo(x @@def); end" - parses "1 ? a : b ? c : 3" parses "1 ? a : b ? c : 3" - says syntax error on "a.[] 0 += 1" says syntax error on "a.[] 0 += 1" - parses "def &; end;" parses "def &; end;" - parses "__FILE__" parses "__FILE__" - says syntax error on "enum Foo\n A, B, C\nend\n" says syntax error on "enum Foo\n A, B, C\nend\n" - says syntax error on "lib Foo; union Bar\"a\"" says syntax error on "lib Foo; union Bar\"a\"" - parses "pointerof(\n foo\n)" parses "pointerof(\n foo\n)" - says syntax error on "lib Foo; struct Bar\"a\"" says syntax error on "lib Foo; struct Bar\"a\"" - parses "foo &.!" parses "foo &.!" - parses "foo /;/" parses "foo /;/" - parses "foo.bar(1, 2) { 3 }" parses "foo.bar(1, 2) { 3 }" - parses "1 ^ 2" parses "1 ^ 2" - parses "foo.==(1, 2)" parses "foo.==(1, 2)" - says syntax error on "def foo(&a foo); end" says syntax error on "def foo(&a foo); end" - parses "@a = uninitialized Foo" parses "@a = uninitialized Foo" - parses "def self.[]; end" parses "def self.[]; end" - parses "Foo()" parses "Foo()" - parses "foo x, *bar" parses "foo x, *bar" - says syntax error on "enum Foo : Int32[1]" says syntax error on "enum Foo : Int32[1]" - parses "def foo(**args : **Foo)\n1\nend" parses "def foo(**args : **Foo)\n1\nend" - sets correct locations of MacroVar in MacroIf / else sets correct locations of MacroVar in MacroIf / else - says syntax error on "def foo(foo nil); end" says syntax error on "def foo(foo nil); end" - parses "a = 1; a &*= 1" parses "a = 1; a &*= 1" - parses "1 == 2 == 3 == 4" parses "1 == 2 == 3 == 4" - says syntax error on "next &** 1" says syntax error on "next &** 1" - says syntax error on "return <= 1" says syntax error on "return <= 1" - says syntax warning on "foo { |foo, (bar?)| }" says syntax warning on "foo { |foo, (bar?)| }" - parses "foo.**" parses "foo.**" - parses "foo(n & 2)" parses "foo(n & 2)" - parses "case 1\nelse\n2\nend" parses "case 1\nelse\n2\nend" - parses "puts %i(one two)" parses "puts %i(one two)" - parses "class Foo(Type); end" parses "class Foo(Type); end" - parses "abstract : Int32" parses "abstract : Int32" - says syntax error on "macro foo(**x, **y)" says syntax error on "macro foo(**x, **y)" - parses "%w{one\\}}" parses "%w{one\\}}" - parses "{% begin %}%x{ %s }{% end %}" parses "{% begin %}%x{ %s }{% end %}" - parses ":-" parses ":-" - parses "foo.=~ 1, 2" parses "foo.=~ 1, 2" - parses "case 1; when 1; 2; else; 3; end" parses "case 1; when 1; 2; else; 3; end" - parses "a.b **=\n1" parses "a.b **=\n1" - says syntax error on "def foo(x, *); 1; end" says syntax error on "def foo(x, *); 1; end" - says syntax error on "def foo(foo return); end" says syntax error on "def foo(foo return); end" - says syntax error on "annotation Foo{|a|a}" says syntax error on "annotation Foo{|a|a}" - parses "foo(n ** 2)" parses "foo(n ** 2)" - parses "[..2]" parses "[..2]" - parses "a = 1; pointerof(a)" parses "a = 1; pointerof(a)" - parses "{1.. => 2};" parses "{1.. => 2};" - parses "class Foo [1] end" parses "class Foo [1] end" - gets corrects of ~ gets corrects of ~ - parses "def self.<; end;" parses "def self.<; end;" - parses "foo.=~(1, 2)" parses "foo.=~(1, 2)" - parses "annotation Foo\nend\nrequire \"bar\"" parses "annotation Foo\nend\nrequire \"bar\"" - parses "1.as(Bar)" parses "1.as(Bar)" - parses "Foo(x: U, y: V)" parses "Foo(x: U, y: V)" - parses "->Foo.+(Int32)" parses "->Foo.+(Int32)" - parses "foo(0, n // 2)" parses "foo(0, n // 2)" - parses "foo(n + 2)" parses "foo(n + 2)" - parses "def foo(var : (Int, Float) -> Double); end" parses "def foo(var : (Int, Float) -> Double); end" - parses "case {1}\nin {Int32.class}; 2; end" parses "case {1}\nin {Int32.class}; 2; end" - parses "asm(\n\"nop\"\n:\n\"a\"(0)\n:\n\"b\"(1),\n\"c\"(2)\n)" parses "asm(\n\"nop\"\n:\n\"a\"(0)\n:\n\"b\"(1),\n\"c\"(2)\n)" - parses "a = /=/" parses "a = /=/" - parses "def foo(x = 1, *y); 1; end" parses "def foo(x = 1, *y); 1; end" - parses "<<-HERE\n \#{1}One\n \#{2}Zero\n HERE" parses "<<-HERE\n \#{1}One\n \#{2}Zero\n HERE" - parses "1 * 2" parses "1 * 2" - parses "->Foo./(Int32)" parses "->Foo./(Int32)" - parses "begin; 1; end;" parses "begin; 1; end;" - parses "lib LibC\nfun SomeFun\nend" parses "lib LibC\nfun SomeFun\nend" - says syntax error on "class Foo%w()" says syntax error on "class Foo%w()" - parses "macro foo;bar{% for x in y %}body{% end %}baz;end" parses "macro foo;bar{% for x in y %}body{% end %}baz;end" - parses "Foo(Bar(T | U))" parses "Foo(Bar(T | U))" - parses "def self.%(); end;" parses "def self.%(); end;" - parses "foo +1.0" parses "foo +1.0" - operator as macro name - parses "macro ^;end" parses "macro ^;end" - parses "macro ~;end" parses "macro ~;end" - parses "macro ==;end" parses "macro ==;end" - parses "macro &;end" parses "macro &;end" - parses "macro >=;end" parses "macro >=;end" - parses "macro |;end" parses "macro |;end" - parses "macro []=;end" parses "macro []=;end" - parses "macro []?;end" parses "macro []?;end" - parses "macro &-;end" parses "macro &-;end" - parses "macro *;end" parses "macro *;end" - parses "macro `;end" parses "macro `;end" - parses "macro !~;end" parses "macro !~;end" - parses "macro <=>;end" parses "macro <=>;end" - parses "macro /;end" parses "macro /;end" - parses "macro <;end" parses "macro <;end" - parses "macro ===;end" parses "macro ===;end" - parses "macro >>;end" parses "macro >>;end" - parses "macro &*;end" parses "macro &*;end" - parses "macro <<;end" parses "macro <<;end" - parses "macro >;end" parses "macro >;end" - parses "macro <=;end" parses "macro <=;end" - parses "macro &**;end" parses "macro &**;end" - parses "macro !=;end" parses "macro !=;end" - parses "macro -;end" parses "macro -;end" - parses "macro =~;end" parses "macro =~;end" - parses "macro &+;end" parses "macro &+;end" - parses "macro +;end" parses "macro +;end" - parses "macro %;end" parses "macro %;end" - parses "macro **;end" parses "macro **;end" - parses "macro //;end" parses "macro //;end" - sets correct location of `else` of if statement sets correct location of `else` of if statement - parses "a = 1; a <<= 1" parses "a = 1; a <<= 1" - parses "a @b-1\nc" parses "a @b-1\nc" - parses "case \nwhen 1\n2\nend" parses "case \nwhen 1\n2\nend" - parses "alignof(\n Int32\n)" parses "alignof(\n Int32\n)" - parses "n ^ 2" parses "n ^ 2" - parses "foo = 1; ->foo.&(Int32)" parses "foo = 1; ->foo.&(Int32)" - parses "->Foo.=~(Int32)" parses "->Foo.=~(Int32)" - says syntax error on "def foo(foo next); end" says syntax error on "def foo(foo next); end" - parses "self / number" parses "self / number" - parses "def self.=~(); end;" parses "def self.=~(); end;" - says syntax error on "if 1 == 1 a; end" says syntax error on "if 1 == 1 a; end" - parses "n > 2" parses "n > 2" - parses "def foo(x @lib); end" parses "def foo(x @lib); end" - says syntax error on "->::@@foo.foo" says syntax error on "->::@@foo.foo" - parses ":|" parses ":|" - parses "->@@foo.foo!" parses "->@@foo.foo!" - parses "property offsetof : Int32" parses "property offsetof : Int32" - parses "<<-EOF.x\n foo\nEOF" parses "<<-EOF.x\n foo\nEOF" - says syntax error on "foo &.[]?(0) = 1" says syntax error on "foo &.[]?(0) = 1" - says syntax error on "enum Foo; A B; end" says syntax error on "enum Foo; A B; end" - parses "def foo(var = 1); end" parses "def foo(var = 1); end" - parses "return 1" parses "return 1" - parses "-@foo" parses "-@foo" - parses "lib LibC; {% if 1 %}2{% end %}; end" parses "lib LibC; {% if 1 %}2{% end %}; end" - parses "->Foo.<(Int32)" parses "->Foo.<(Int32)" - parses "`foo\\``" parses "`foo\\``" - parses "foo(0, n &** 2)" parses "foo(0, n &** 2)" - parses "until true; end;" parses "until true; end;" - says syntax error on "*1, a = 2" says syntax error on "*1, a = 2" - says syntax error on "<<-'HEREDOC'\n" says syntax error on "<<-'HEREDOC'\n" - says syntax error on "while return; end" says syntax error on "while return; end" - parses "foo %Q()" parses "foo %Q()" - parses "foo.&(1, 2) { 3 }" parses "foo.&(1, 2) { 3 }" - parses "foo.%(1, 2) { 3 }" parses "foo.%(1, 2) { 3 }" - parses "foo.-(1, 2) { 3 }" parses "foo.-(1, 2) { 3 }" - parses "def >(); end;" parses "def >(); end;" - sets correct location of receiver var in method def sets correct location of receiver var in method def - parses "begin : Int32" parses "begin : Int32" - parses "->::foo" parses "->::foo" - parses "1 / 2" parses "1 / 2" - parses "begin\n1\nend\nif true; end" parses "begin\n1\nend\nif true; end" - parses "def ==(); end" parses "def ==(); end" - parses "foo.<=" parses "foo.<=" - parses "def foo(unless foo); end" parses "def foo(unless foo); end" - says syntax error on "x[1:-2]" says syntax error on "x[1:-2]" - parses "{a: 1, b: 2}" parses "{a: 1, b: 2}" - says syntax error on "x--" says syntax error on "x--" - parses "def ^; end;" parses "def ^; end;" - says syntax error on "class Foo(X\n,Y); 1; end" says syntax error on "class Foo(X\n,Y); 1; end" - parses "def self.+; end;" parses "def self.+; end;" - parses "def +(); end;" parses "def +(); end;" - parses "foo.+(1, 2)" parses "foo.+(1, 2)" - parses "def foo(*y : *T); 1; end" parses "def foo(*y : *T); 1; end" - parses "foo.<=(1, 2) { 3 }" parses "foo.<=(1, 2) { 3 }" - says syntax error on "annotation Foo[1]" says syntax error on "annotation Foo[1]" - parses "/ /; / /" parses "/ /; / /" - parses "Foo(X, offsetof(Foo, @a))" parses "Foo(X, offsetof(Foo, @a))" - says syntax warning on "macro foo(bar!); end" says syntax warning on "macro foo(bar!); end" - parses "case :foo; when :bar; 2; end" parses "case :foo; when :bar; 2; end" - says syntax error on "def foo(foo end); end" says syntax error on "def foo(foo end); end" - parses "Foo(typeof(1), typeof(2))" parses "Foo(typeof(1), typeof(2))" - parses "\"hello \"\\\r\n\"world\"" parses "\"hello \"\\\r\n\"world\"" - parses "macro foo;end" parses "macro foo;end" - parses "asm(\n\"nop\"\n:\n\"a\"(0),\n\"b\"(1)\n:\n\"c\"(2),\n\"d\"(3)\n)" parses "asm(\n\"nop\"\n:\n\"a\"(0),\n\"b\"(1)\n:\n\"c\"(2),\n\"d\"(3)\n)" - says syntax error on "\n lib LibFoo\n fun foo(x : Int32\n y : Float64)\n end\n " says syntax error on "\n lib LibFoo\n fun foo(x : Int32\n y : Float64)\n end\n " - parses "Foo(X, alignof(Int32))" parses "Foo(X, alignof(Int32))" - parses "def foo(yield foo); end" parses "def foo(yield foo); end" - says syntax error on "enum Foo : Int32{1}" says syntax error on "enum Foo : Int32{1}" - says syntax error on "lib Foo:qux" says syntax error on "lib Foo:qux" - parses "foo(x:\n begin\n result : Int32 = 1\n result\n end\n )" parses "foo(x:\n begin\n result : Int32 = 1\n result\n end\n )" - parses "foo%x" parses "foo%x" - parses "a.b <<=\n1" parses "a.b <<=\n1" - says syntax error on "alias Foo?" says syntax error on "alias Foo?" - says syntax error on "{{ {{ 1 }} }}" says syntax error on "{{ {{ 1 }} }}" - says syntax error on "def foo(end); end" says syntax error on "def foo(end); end" - parses "x[a: 1, b: 2,]" parses "x[a: 1, b: 2,]" - parses "{} of Int32 -> Int32 => Int32" parses "{} of Int32 -> Int32 => Int32" - parses "foo [1]" parses "foo [1]" - parses "def foo(x @@false); end" parses "def foo(x @@false); end" - parses "1.as(\n Int32\n)" parses "1.as(\n Int32\n)" - parses "foo.>=(1, 2)" parses "foo.>=(1, 2)" - parses "a = 1; yield a rescue a" parses "a = 1; yield a rescue a" - says syntax error on "foo { |(end)| }" says syntax error on "foo { |(end)| }" - parses "a = 1; a &*=\n1" parses "a = 1; a &*=\n1" - says syntax warning on "macro foo(bar?); end" says syntax warning on "macro foo(bar?); end" - says syntax error on "foo { |(with)| }" says syntax error on "foo { |(with)| }" - parses "{% x unless 1 %}" parses "{% x unless 1 %}" - parses "def foo(asm foo); end" parses "def foo(asm foo); end" - says syntax error on "next &- 1" says syntax error on "next &- 1" - parses "->Foo.&-(Int32)" parses "->Foo.&-(Int32)" - parses "foo a: 1, b: 2" parses "foo a: 1, b: 2" - parses "foo.!~(1, 2)" parses "foo.!~(1, 2)" - parses "macro foo;{% verbatim do %}1{% foo %}2{% end %};end" parses "macro foo;{% verbatim do %}1{% foo %}2{% end %};end" - says syntax error on "Hash {foo: 1} of Int32 => Int32" says syntax error on "Hash {foo: 1} of Int32 => Int32" - parses "foo.*(1, 2) { 3 }" parses "foo.*(1, 2) { 3 }" - parses "foo &.block=(0)" parses "foo &.block=(0)" - parses "a.b &-=\n1" parses "a.b &-=\n1" - says syntax error on "A = B = 1" says syntax error on "A = B = 1" - parses "1 if 3" parses "1 if 3" - parses "foo.| do end" parses "foo.| do end" - parses "def ===(); end;" parses "def ===(); end;" - parses "foo &.each do\nend" parses "foo &.each do\nend" - parses "def |(); end;" parses "def |(); end;" - parses "1 + 2" parses "1 + 2" - parses "def foo(a, @[Foo] var); end" parses "def foo(a, @[Foo] var); end" - parses "module Foo(T); end" parses "module Foo(T); end" - parses "a = 1; a/b" parses "a = 1; a/b" - says syntax error on "foo &.[]? = 1" says syntax error on "foo &.[]? = 1" - parses "1 ensure 2 if 3" parses "1 ensure 2 if 3" - parses "foo.=~(1, 2) { 3 }" parses "foo.=~(1, 2) { 3 }" - says syntax error on "def foo(pointerof); end" says syntax error on "def foo(pointerof); end" - parses "def foo(**args : Foo)\n1\nend" parses "def foo(**args : Foo)\n1\nend" - parses "->Foo.&*(Int32)" parses "->Foo.&*(Int32)" - parses "foo &.%(1)" parses "foo &.%(1)" - parses "foo 1" parses "foo 1" - says syntax error on "enum Foo{|a|a}" says syntax error on "enum Foo{|a|a}" - parses "class Foo < Bar; end" parses "class Foo < Bar; end" - parses "foo.<(1, 2) { 3 }" parses "foo.<(1, 2) { 3 }" - parses "enum Foo; A = 1\ndef foo; 1; end\ndef bar; 2; end\nend" parses "enum Foo; A = 1\ndef foo; 1; end\ndef bar; 2; end\nend" - parses "->Foo.foo=" parses "->Foo.foo=" - says syntax error on "def foo(x : U) forall U,; end" says syntax error on "def foo(x : U) forall U,; end" - parses "foo.* 1, 2" parses "foo.* 1, 2" - parses "def ===; end;" parses "def ===; end;" - parses "def foo(@@out); end" parses "def foo(@@out); end" - says syntax error on "foo { |(unless)| }" says syntax error on "foo { |(unless)| }" - parses "foo = 1; foo(-1)" parses "foo = 1; foo(-1)" - parses "foo -1.0, -2.0" parses "foo -1.0, -2.0" - parses "def ^(); end;" parses "def ^(); end;" - says syntax error on "lib Foo; struct Bar{1}" says syntax error on "lib Foo; struct Bar{1}" - says syntax error on "def foo(foo unless); end" says syntax error on "def foo(foo unless); end" - parses "foo.-" parses "foo.-" - parses "enum Foo::Bar; A = 1; end" parses "enum Foo::Bar; A = 1; end" - says syntax error on "break[0]" says syntax error on "break[0]" - says syntax error on "foo { |class| }" says syntax error on "foo { |class| }" - parses "foo &./(1)" parses "foo &./(1)" - parses "<<-FOO\n \t 1\n \t FOO" parses "<<-FOO\n \t 1\n \t FOO" - parses "enum Foo; A = 1\ndef foo; 1; end; end" parses "enum Foo; A = 1\ndef foo; 1; end; end" - parses "->Foo.foo" parses "->Foo.foo" - says syntax error on "lib Foo; struct Bar:Qux" says syntax error on "lib Foo; struct Bar:Qux" - parses "case\nwhen true\n1\nend" parses "case\nwhen true\n1\nend" - parses "Foo(T)?" parses "Foo(T)?" - parses "property self : Int32" parses "property self : Int32" - parses "foo %w" parses "foo %w" - parses "{% for x in y %}body{% end %}" parses "{% for x in y %}body{% end %}" - parses "def foo(@@module); end" parses "def foo(@@module); end" - parses "1 <=> 2" parses "1 <=> 2" - says syntax error on "[1\n,2]" says syntax error on "[1\n,2]" - parses "@@a : Foo = 1" parses "@@a : Foo = 1" - parses "\"hello \#{1}\" \\\n \"\#{2} world\"" parses "\"hello \#{1}\" \\\n \"\#{2} world\"" - parses "foo = 1; ->foo.**(Int32)" parses "foo = 1; ->foo.**(Int32)" - says syntax error on "->::@foo.foo" says syntax error on "->::@foo.foo" - parses "def foo(x @@out); end" parses "def foo(x @@out); end" - parses "foo.>=" parses "foo.>=" - says syntax error on "struct Foo'a'" says syntax error on "struct Foo'a'" - says syntax error on "next > 1" says syntax error on "next > 1" - says syntax error on "next &+ 1" says syntax error on "next &+ 1" - parses "a.b -=\n1" parses "a.b -=\n1" - parses "def foo(@@if); end" parses "def foo(@@if); end" - parses "def self.==(); end;" parses "def self.==(); end;" - parses "lib LibC\nfun getchar : Int\nend" parses "lib LibC\nfun getchar : Int\nend" - parses "a = 1; a |= 1" parses "a = 1; a |= 1" - parses "{1 => 2, 3 => 4}" parses "{1 => 2, 3 => 4}" - parses "macro foo(@[Foo] var);end" parses "macro foo(@[Foo] var);end" - says syntax error on "def foo(foo self); end" says syntax error on "def foo(foo self); end" - parses "->Foo.&+(Int32)" parses "->Foo.&+(Int32)" - says syntax error on "%Q(" says syntax error on "%Q(" - parses "{\"foo\": 1, \"bar\": 2}" parses "{\"foo\": 1, \"bar\": 2}" - parses "property instance_sizeof : Int32" parses "property instance_sizeof : Int32" - parses "foo(\n1)" parses "foo(\n1)" - parses "[\n1,2\n]" parses "[\n1,2\n]" - parses "Foo(1)" parses "Foo(1)" - parses "[] of ->;" parses "[] of ->;" - parses "def <(); end" parses "def <(); end" - says syntax error on "Foo(x: T y: U)" says syntax error on "Foo(x: T y: U)" - parses "-> { }" parses "-> { }" - parses "if foo; 1; elsif bar; 2; else 3; end" parses "if foo; 1; elsif bar; 2; else 3; end" - parses "a = 1; a &-= 1" parses "a = 1; a &-= 1" - parses "foo(n / 2)" parses "foo(n / 2)" - parses "def foo(x @instance_sizeof); end" parses "def foo(x @instance_sizeof); end" - parses "1 \\\n + 2" parses "1 \\\n + 2" - parses "property elsif : Int32" parses "property elsif : Int32" - says syntax error on "a, B = 1, 2" says syntax error on "a, B = 1, 2" - parses "asm(\"nop\" ::::)" parses "asm(\"nop\" ::::)" - says syntax error on "foo { |(self)| }" says syntax error on "foo { |(self)| }" - says syntax error on "foo { |in| }" says syntax error on "foo { |in| }" - parses "foo.is_a?(Const)" parses "foo.is_a?(Const)" - says syntax error on "class Foo < Bar%()" says syntax error on "class Foo < Bar%()" - parses "a/b" parses "a/b" - says syntax error on "foo(return)" says syntax error on "foo(return)" - parses "foo()" parses "foo()" - parses "foo(0, n &- 2)" parses "foo(0, n &- 2)" - parses "def foo(@@end); end" parses "def foo(@@end); end" - parses "foo = 1; b = 2; foo +b" parses "foo = 1; b = 2; foo +b" - says syntax error on "lib Foo; enum Bar%()" says syntax error on "lib Foo; enum Bar%()" - parses "->Foo.&**(Int32)" parses "->Foo.&**(Int32)" - says syntax error on "def foo!=; end" says syntax error on "def foo!=; end" - says syntax error on "break - 1" says syntax error on "break - 1" - sets correct location of call name in operator assignment sets correct location of call name in operator assignment - says syntax error on "case x; when {1, 2}; 2; when {1, 2}; end" says syntax error on "case x; when {1, 2}; 2; when {1, 2}; end" - parses "foo" parses "foo" - says syntax error on "return &** 1" says syntax error on "return &** 1" - parses "{/ / => / /, / / => / /}" parses "{/ / => / /, / / => / /}" - parses "-1" parses "-1" - parses "foo { |a| 1 }" parses "foo { |a| 1 }" - says syntax error on "return &+ 1" says syntax error on "return &+ 1" - parses "def foo(x @@class); end" parses "def foo(x @@class); end" - sets correct location of var in type declaration sets correct location of var in type declaration - parses "case {1}\nin {Foo(Int32)}; 2; end" parses "case {1}\nin {Foo(Int32)}; 2; end" - parses "def foo(@require); end" parses "def foo(@require); end" - parses "case 1\nin .bar?; 2; end" parses "case 1\nin .bar?; 2; end" - says syntax error on "[1 1]" says syntax error on "[1 1]" - says syntax error on "lib Foo; union Bar'a'" says syntax error on "lib Foo; union Bar'a'" - sets correct location of annotation in lib sets correct location of annotation in lib - says syntax error on "x { |*a, *b| }" says syntax error on "x { |*a, *b| }" - says syntax error on "until next; end" says syntax error on "until next; end" - parses "case 1\nwhen 1\n2\nelse\n3\nend" parses "case 1\nwhen 1\n2\nelse\n3\nend" - says syntax error on "a = 1, 2, 3" says syntax error on "a = 1, 2, 3" - parses "def foo=(value); end" parses "def foo=(value); end" - parses "def self.foo\n1\nend" parses "def self.foo\n1\nend" - says syntax error on "fun foo\nclass" says syntax error on "fun foo\nclass" - parses "break {1, 2}" parses "break {1, 2}" - says syntax error on "def foo(sizeof); end" says syntax error on "def foo(sizeof); end" - says syntax error on "enum Foo : Int32{|a|a}" says syntax error on "enum Foo : Int32{|a|a}" - parses "asm(\"nop\" : \"a\"(0) : \"b\"(1), \"c\"(2))" parses "asm(\"nop\" : \"a\"(0) : \"b\"(1), \"c\"(2))" - parses "a.b/2" parses "a.b/2" - parses "case / /\nwhen / /\n/ /\nelse\n/ /\nend" parses "case / /\nwhen / /\n/ /\nelse\n/ /\nend" - parses "a = 1\nfoo - a" parses "a = 1\nfoo - a" - says syntax error on "foo { |(instance_sizeof)| }" says syntax error on "foo { |(instance_sizeof)| }" - says syntax warning on "macro foo(foo bar?); end" says syntax warning on "macro foo(foo bar?); end" - parses "foo 1;" parses "foo 1;" - parses "def foo(@@while); end" parses "def foo(@@while); end" - parses "def foo : Int32\n1\nend" parses "def foo : Int32\n1\nend" - says syntax error on "next .. 1" says syntax error on "next .. 1" - parses "def foo(@@alias); end" parses "def foo(@@alias); end" - says syntax error on "a.[]() += 1" says syntax error on "a.[]() += 1" - parses "begin; 1; rescue ex; 2; end; ex" parses "begin; 1; rescue ex; 2; end; ex" - parses "property break : Int32" parses "property break : Int32" - parses "foo.[]=" parses "foo.[]=" - says syntax error on "<<-HERE\n One\n \#{1}\n Zero\n HERE" says syntax error on "<<-HERE\n One\n \#{1}\n Zero\n HERE" - says syntax error on "lib Foo; struct Bar'a'" says syntax error on "lib Foo; struct Bar'a'" - parses "def self.foo=\n1\nend" parses "def self.foo=\n1\nend" - parses "foo(n &* 2)" parses "foo(n &* 2)" - parses "foo(a: n !~ 2)" parses "foo(a: n !~ 2)" - parses "foo(a: n ^ 2)" parses "foo(a: n ^ 2)" - parses "case 1; end" parses "case 1; end" - parses "foo 1\n" parses "foo 1\n" - parses "{/ /, / /}" parses "{/ /, / /}" - parses "foo(z: 0, a: n ** 2)" parses "foo(z: 0, a: n ** 2)" - parses "annotation Foo; end" parses "annotation Foo; end" - parses "foo.!~" parses "foo.!~" - parses "foo(z: 0, a: n & 2)" parses "foo(z: 0, a: n & 2)" - parses "module Foo(*T); end" parses "module Foo(*T); end" - parses "1.responds_to?(\n :foo\n)" parses "1.responds_to?(\n :foo\n)" - parses "<<-HERE\n One\n \n Zero\n HERE" parses "<<-HERE\n One\n \n Zero\n HERE" - parses "foo.>= do end" parses "foo.>= do end" - says syntax error on "A = (B = 1)" says syntax error on "A = (B = 1)" - says syntax error on "foo &.bar.[](0) = 1" says syntax error on "foo &.bar.[](0) = 1" - parses "def foo(@until); end" parses "def foo(@until); end" - parses "def foo(@@select); end" parses "def foo(@@select); end" - parses "x : Foo(A, *B, C)" parses "x : Foo(A, *B, C)" - parses "yield if true" parses "yield if true" - says syntax error on "1 .. break" says syntax error on "1 .. break" - says syntax error on "*a == 1" says syntax error on "*a == 1" - parses "->@foo.foo!" parses "->@foo.foo!" - says syntax error on "next % 1" says syntax error on "next % 1" - parses "abstract def foo : Int32" parses "abstract def foo : Int32" - parses "next;" parses "next;" - parses "def foo(return foo); end" parses "def foo(return foo); end" - says syntax error on "def foo(foo true); end" says syntax error on "def foo(foo true); end" - parses "class Foo %x() end" parses "class Foo %x() end" - parses "a = 1; a &+=\n1" parses "a = 1; a &+=\n1" - says syntax error on "while next; end" says syntax error on "while next; end" - says syntax error on "<<-HERE\n One\n wrong\n Zero\n HERE" says syntax error on "<<-HERE\n One\n wrong\n Zero\n HERE" - parses "def foo(var : self.class); end" parses "def foo(var : self.class); end" - parses "unless foo; 1; else; 2; end" parses "unless foo; 1; else; 2; end" - parses "case a\nwhen b\n/ /\n\nelse\n/ /\nend" parses "case a\nwhen b\n/ /\n\nelse\n/ /\nend" - parses "def foo(var : Int); end" parses "def foo(var : Int); end" - says syntax error on "a {}, b = 1" says syntax error on "a {}, b = 1" - parses "{% begin %}%Q[ %s ]{% end %}" parses "{% begin %}%Q[ %s ]{% end %}" - parses "def foo(var : Int -> Double); end" parses "def foo(var : Int -> Double); end" - says syntax error on "foo { |extend| }" says syntax error on "foo { |extend| }" - parses "def foo(x @private); end" parses "def foo(x @private); end" - parses "def foo(x @@asm); end" parses "def foo(x @@asm); end" - parses "def foo(x @@protected); end" parses "def foo(x @@protected); end" - parses "{\"\".id}" parses "{\"\".id}" - parses "1 << 2" parses "1 << 2" - parses "1 || 2" parses "1 || 2" - parses "def foo; yield(1); end" parses "def foo; yield(1); end" - says syntax error on "unless next; end" says syntax error on "unless next; end" - parses "a, b = 1, 2" parses "a, b = 1, 2" - parses "def foo(@self); end" parses "def foo(@self); end" - parses "{[] of Foo, ::foo}" parses "{[] of Foo, ::foo}" - parses "begin\n/ /\nend" parses "begin\n/ /\nend" - parses "foo(a: n &* 2)" parses "foo(a: n &* 2)" - parses "foo(Bar) { 1 }" parses "foo(Bar) { 1 }" - parses "property false : Int32" parses "property false : Int32" - says syntax error on "def foo(while); end" says syntax error on "def foo(while); end" - parses "lib LibC; struct Foo; x, y, z : Int; end end" parses "lib LibC; struct Foo; x, y, z : Int; end end" - parses "-1_i64" parses "-1_i64" - parses "private : Int32" parses "private : Int32" - parses "protected def foo; end" parses "protected def foo; end" - parses "def foo(x @@enum); end" parses "def foo(x @@enum); end" - parses "foo(z: 0, a: n !~ 2)" parses "foo(z: 0, a: n !~ 2)" - parses "def foo(@@abstract); end" parses "def foo(@@abstract); end" - says syntax error on "macro Foo;end" says syntax error on "macro Foo;end" - says syntax error on "\"\#{<<-HERE}\"\nHERE" says syntax error on "\"\#{<<-HERE}\"\nHERE" - parses "lib LibC; fun foo(a : ::B, ::C -> ::D); end" parses "lib LibC; fun foo(a : ::B, ::C -> ::D); end" - parses "foo.+ do end" parses "foo.+ do end" - parses "1" parses "1" - parses "select\nwhen foo\n2\nelse\n3\nend" parses "select\nwhen foo\n2\nelse\n3\nend" - parses "{\"foo\": 1}" parses "{\"foo\": 1}" - says syntax error on "def foo(out); end" says syntax error on "def foo(out); end" - says syntax error on "lib Foo {|a|a}" says syntax error on "lib Foo {|a|a}" - says syntax error on "A = begin; 1; ensure; B = 1; end" says syntax error on "A = begin; 1; ensure; B = 1; end" - parses "foo(&.responds_to?(:foo))" parses "foo(&.responds_to?(:foo))" - parses "def foo(var : Int | Double); end" parses "def foo(var : Int | Double); end" - parses "1\n+2" parses "1\n+2" - parses "foo.< 1, 2" parses "foo.< 1, 2" - says syntax error on "def foo(typeof); end" says syntax error on "def foo(typeof); end" - says syntax error on "foo { |(alias)| }" says syntax error on "foo { |(alias)| }" - parses "a = 1; a //=\n1" parses "a = 1; a //=\n1" - parses "->Foo.>>(Int32)" parses "->Foo.>>(Int32)" - says syntax error on "break + 1" says syntax error on "break + 1" - says syntax error on "break // 1" says syntax error on "break // 1" - parses "+1.0" parses "+1.0" - parses "n | 2" parses "n | 2" - parses "foo = 1; ->foo.&+(Int32)" parses "foo = 1; ->foo.&+(Int32)" - parses "def foo(extend foo); end" parses "def foo(extend foo); end" - parses "foo do\n//\nend" parses "foo do\n//\nend" - parses "property next : Int32" parses "property next : Int32" - says syntax error on "foo &.[0]? += 1" says syntax error on "foo &.[0]? += 1" - parses "foo.Bar" parses "foo.Bar" - parses "def |; end;" parses "def |; end;" - says syntax error on "class Foo(*T, *U); end" says syntax error on "class Foo(*T, *U); end" - parses "yield 1" parses "yield 1" - says syntax error on "def foo(x : U) forall U, U; end" says syntax error on "def foo(x : U) forall U, U; end" - says syntax error on "enum Foo%()" says syntax error on "enum Foo%()" - parses "a : Foo | Int32" parses "a : Foo | Int32" - parses "\"foo\#{bar}baz\"" parses "\"foo\#{bar}baz\"" - sets correct location of global path in class def sets correct location of global path in class def - parses "a, *b = 1" parses "a, *b = 1" - parses "def foo(@[Foo] **args); end" parses "def foo(@[Foo] **args); end" - parses "1.0" parses "1.0" - parses "asm(\"nop\" :: \"b\"(1), \"c\"(2))" parses "asm(\"nop\" :: \"b\"(1), \"c\"(2))" - says syntax error on "foo(break)" says syntax error on "foo(break)" - says syntax error on "return.foo" says syntax error on "return.foo" - parses ":<=" parses ":<=" - says syntax error on "{1 => 2, 3 => 4 5 => 6}" says syntax error on "{1 => 2, 3 => 4 5 => 6}" - says syntax error on "def foo(until); end" says syntax error on "def foo(until); end" - parses "foo.| 1, 2" parses "foo.| 1, 2" - parses "if (\ntrue\n)\n1\nend" parses "if (\ntrue\n)\n1\nend" - says syntax error on "def foo(foo begin); end" says syntax error on "def foo(foo begin); end" - parses "foo { |a, b| 1 }" parses "foo { |a, b| 1 }" - parses "foo.< do end" parses "foo.< do end" - parses "foo &.as(T)" parses "foo &.as(T)" - parses "foo(a: n >> 2)" parses "foo(a: n >> 2)" - parses "module Foo %x() end" parses "module Foo %x() end" - parses "foo { |(a, *b, c)| }" parses "foo { |(a, *b, c)| }" - says syntax error on "Foo(T U)" says syntax error on "Foo(T U)" - parses "@a : Foo" parses "@a : Foo" - parses "foo.>(1, 2)" parses "foo.>(1, 2)" - says syntax error on "Foo({x: X, x: Y})" says syntax error on "Foo({x: X, x: Y})" - says syntax error on "def foo @@var, █ end" says syntax error on "def foo @@var, █ end" - says syntax error on "def foo(_ y); y; end" says syntax error on "def foo(_ y); y; end" - parses "Set(Int32) {1, 2, 3}" parses "Set(Int32) {1, 2, 3}" - parses "while true; 1; end;" parses "while true; 1; end;" - says syntax error on "lib Foo; enum Bar[1]" says syntax error on "lib Foo; enum Bar[1]" - says syntax error on "class Foo; require \"bar\"; end" says syntax error on "class Foo; require \"bar\"; end" - says syntax error on "foo.[0]? += 1" says syntax error on "foo.[0]? += 1" - says syntax error on "foo { |(yield)| }" says syntax error on "foo { |(yield)| }" - says syntax error on "foo { |(in)| }" says syntax error on "foo { |(in)| }" - says syntax error on "foo { |(begin)| }" says syntax error on "foo { |(begin)| }" - parses "Foo?" parses "Foo?" - parses "begin; 1; rescue ex : ::Foo | ::Bar; 2; end" parses "begin; 1; rescue ex : ::Foo | ::Bar; 2; end" - parses "def self.===; end;" parses "def self.===; end;" - says syntax error on "1 .. return" says syntax error on "1 .. return" - says syntax warning on "foo { |foo, (bar!)| }" says syntax warning on "foo { |foo, (bar!)| }" - parses "n &* 2" parses "n &* 2" - says syntax error on "case x; when :a; 2; when :a; end" says syntax error on "case x; when :a; 2; when :a; end" - parses "include Foo\nif true; end" parses "include Foo\nif true; end" - parses "1 <= 2 <= 3" parses "1 <= 2 <= 3" - says syntax error on "[\n\"foo\"\n\"bar\"\n]" says syntax error on "[\n\"foo\"\n\"bar\"\n]" - parses "a : Foo()*" parses "a : Foo()*" - parses "foo(x: result : Int32); result" parses "foo(x: result : Int32); result" - parses "def foo(x @while); end" parses "def foo(x @while); end" - parses "def foo(x @with); end" parses "def foo(x @with); end" - parses "lib LibC; fun foo(a : Int**); end" parses "lib LibC; fun foo(a : Int**); end" - parses "def foo(@@struct); end" parses "def foo(@@struct); end" - says syntax error on "break[]" says syntax error on "break[]" - parses ":<" parses ":<" - parses "next 1" parses "next 1" - parses "macro foo;%var;end" parses "macro foo;%var;end" - parses "enum Foo; def foo; 1; end; end" parses "enum Foo; def foo; 1; end; end" - says syntax error on "lib Foo; enum Bar%x()" says syntax error on "lib Foo; enum Bar%x()" - parses "1.as Bar" parses "1.as Bar" - says syntax error on "foo { |pointerof| }" says syntax error on "foo { |pointerof| }" - parses "property true : Int32" parses "property true : Int32" - parses "struct Foo :bar end" parses "struct Foo :bar end" - says syntax error on "foo { |(sizeof)| }" says syntax error on "foo { |(sizeof)| }" - parses "enum Foo; private def foo; 1; end; end" parses "enum Foo; private def foo; 1; end; end" - says syntax error on "case x; when _; end" says syntax error on "case x; when _; end" - parses "foo.** do end" parses "foo.** do end" - says syntax error on "Hash{\"foo\": 1, \"bar\": 2}" says syntax error on "Hash{\"foo\": 1, \"bar\": 2}" - parses "(1; 2; 3)" parses "(1; 2; 3)" - parses "1 // 2" parses "1 // 2" - says syntax error on "a = 1; a += next" says syntax error on "a = 1; a += next" - parses "foo &.block[] = 1" parses "foo &.block[] = 1" - parses "%w{one\ntwo}" parses "%w{one\ntwo}" - parses "def foo(&); end" parses "def foo(&); end" - parses "class Foo :bar end" parses "class Foo :bar end" - parses "def foo(@false); end" parses "def foo(@false); end" - parses "->@@foo.foo?" parses "->@@foo.foo?" - says syntax error on "def foo(false); end" says syntax error on "def foo(false); end" - parses "/ /\n/ /" parses "/ /\n/ /" - says syntax error on "annotation Foo%w()" says syntax error on "annotation Foo%w()" - parses "1;-2" parses "1;-2" - parses "foo(1, **bar)" parses "foo(1, **bar)" - says syntax error on "break[0]= 1" says syntax error on "break[0]= 1" - parses "foo %r()" parses "foo %r()" - parses "foo.<= do end" parses "foo.<= do end" - says syntax error on "lib Foo; union Bar{1}" says syntax error on "lib Foo; union Bar{1}" - parses "foo = 1; foo &x" parses "foo = 1; foo &x" - says syntax error on "a, b.<=" says syntax error on "a, b.<=" - parses "{\n{1}\n}" parses "{\n{1}\n}" - parses "return 1 if true" parses "return 1 if true" - says syntax error on "struct Foo{|a|a}" says syntax error on "struct Foo{|a|a}" - parses "foo.!=(1, 2)" parses "foo.!=(1, 2)" - parses "def foo(a, &block : -> Double); end" parses "def foo(a, &block : -> Double); end" - parses "foo(n === 2)" parses "foo(n === 2)" - parses "foo.==(1, 2) { 3 }" parses "foo.==(1, 2) { 3 }" - parses "private def foo; end" parses "private def foo; end" - says syntax error on "{\n1 => 2\n3 => 4\n}" says syntax error on "{\n1 => 2\n3 => 4\n}" - says syntax error on "{foo: 1\nbar: 2}" says syntax error on "{foo: 1\nbar: 2}" - says syntax error on "def foo(abstract); end" says syntax error on "def foo(abstract); end" - parses "1 &* 2" parses "1 &* 2" - says syntax error on "enum Foo:qux" says syntax error on "enum Foo:qux" - parses "def self./(); end;" parses "def self./(); end;" - says syntax error on "def foo(begin); end" says syntax error on "def foo(begin); end" - parses "fun foo(x : Int32) : Int64\nx\nend" parses "fun foo(x : Int32) : Int64\nx\nend" - says syntax error on "class Foo%x()" says syntax error on "class Foo%x()" - says syntax error on "macro foo x; 1 + 2; end" says syntax error on "macro foo x; 1 + 2; end" - says syntax error on "foo {1, 2}" says syntax error on "foo {1, 2}" - parses "def foo(x @@end); end" parses "def foo(x @@end); end" - parses "asm(\"nop\" \n)" parses "asm(\"nop\" \n)" - parses "_, *_, _, _ = 1, 2, 3" parses "_, *_, _, _ = 1, 2, 3" - parses "def foo(@@def); end" parses "def foo(@@def); end" - parses "def foo(@@case); end" parses "def foo(@@case); end" - parses "-@@foo" parses "-@@foo" - parses "instance_sizeof(X)" parses "instance_sizeof(X)" - parses "elsif : Int32" parses "elsif : Int32" - parses "1 / 2" parses "1 / 2" - parses "{\n1\n}" parses "{\n1\n}" - parses "def [](x); end" parses "def [](x); end" - parses "macro foo;bar(end: 1);end" parses "macro foo;bar(end: 1);end" - parses "def foo(@offsetof); end" parses "def foo(@offsetof); end" - says syntax error on "foo { |struct| }" says syntax error on "foo { |struct| }" - says syntax error on "lib Foo; union Bar:qux" says syntax error on "lib Foo; union Bar:qux" - parses "@@foo/2" parses "@@foo/2" - parses "foo(z: 0, a: n > 2)" parses "foo(z: 0, a: n > 2)" - says syntax error on "def foo(macro); end" says syntax error on "def foo(macro); end" - parses "def foo(@@require); end" parses "def foo(@@require); end" - parses "lib LibC\nfun getch = \"get.char\" : Int32\nend" parses "lib LibC\nfun getch = \"get.char\" : Int32\nend" - parses "def foo(x @enum); end" parses "def foo(x @enum); end" - parses "def foo(@[Foo] var); end" parses "def foo(@[Foo] var); end" - parses "foo 1, **bar, &block" parses "foo 1, **bar, &block" - parses "def foo; yield 1; end" parses "def foo; yield 1; end" - says syntax error on "break &- 1" says syntax error on "break &- 1" - parses "property else : Int32" parses "property else : Int32" - parses "def foo(x @require); end" parses "def foo(x @require); end" - says syntax error on "next >= 1" says syntax error on "next >= 1" - parses "{% begin %}%{ %s }{% end %}" parses "{% begin %}%{ %s }{% end %}" - parses "foo(/ /, / /)" parses "foo(/ /, / /)" - parses "->@foo.foo?" parses "->@foo.foo?" - parses "property module : Int32" parses "property module : Int32" - parses "def foo; a = 1; a {}; end" parses "def foo; a = 1; a {}; end" - parses "{%\nunless 1; 2; end; 3\n%}" parses "{%\nunless 1; 2; end; 3\n%}" - says syntax error on "def foo=(*args); end" says syntax error on "def foo=(*args); end" - says syntax error on "enum Foo : Int32->{}" says syntax error on "enum Foo : Int32->{}" - says syntax error on "asm(\"nop\" ::: \"\#{foo}\")" says syntax error on "asm(\"nop\" ::: \"\#{foo}\")" - parses "\"foo\#{\"bar\"}baz\"" parses "\"foo\#{\"bar\"}baz\"" - says syntax error on "def foo(var = x : Int); end" says syntax error on "def foo(var = x : Int); end" - says syntax error on "def foo(offsetof); end" says syntax error on "def foo(offsetof); end" - says syntax error on "lib Foo:Qux" says syntax error on "lib Foo:Qux" - parses "foo(n | 2)" parses "foo(n | 2)" - parses "def self.**(); end;" parses "def self.**(); end;" - says syntax warning on "foo { |bar!| }" says syntax warning on "foo { |bar!| }" - says syntax error on "<<-HERE\n One\n \#{1}\n wrong\#{1}\n HERE" says syntax error on "<<-HERE\n One\n \#{1}\n wrong\#{1}\n HERE" - parses "include : Int32" parses "include : Int32" - says syntax error on "{1 2}" says syntax error on "{1 2}" - says syntax error on "return == 1" says syntax error on "return == 1" - says syntax error on "foo { |require| }" says syntax error on "foo { |require| }" - parses "qux \"foo\#{bar do end}baz\"" parses "qux \"foo\#{bar do end}baz\"" - says syntax error on "def foo(extend); end" says syntax error on "def foo(extend); end" - parses "class Foo %w() end" parses "class Foo %w() end" - parses "case a\nwhen b\n1 / 2\nelse\n1 / 2\nend" parses "case a\nwhen b\n1 / 2\nelse\n1 / 2\nend" - parses "foo(n >= 2)" parses "foo(n >= 2)" - says syntax error on "lib Foo; union Bar%x()" says syntax error on "lib Foo; union Bar%x()" - says syntax error on "case {1, 2}; when {3}; 4; end" says syntax error on "case {1, 2}; when {3}; 4; end" - says syntax error on "return < 1" says syntax error on "return < 1" - parses "def foo(x @@abstract); end" parses "def foo(x @@abstract); end" - says syntax error on "foo { |(if)| }" says syntax error on "foo { |(if)| }" - parses "macro foo\n'\\''\nend" parses "macro foo\n'\\''\nend" - says syntax error on "b! = 1" says syntax error on "b! = 1" - says syntax error on "a = a" says syntax error on "a = a" - parses "next *1" parses "next *1" - says syntax error on "def foo(\"\" y); y; end" says syntax error on "def foo(\"\" y); y; end" - parses "n == 2" parses "n == 2" - parses "a = 1; a &= 1" parses "a = 1; a &= 1" - parses "{%\n2 unless 1; 3\n%}" parses "{%\n2 unless 1; 3\n%}" - parses "def foo(x @@private); end" parses "def foo(x @@private); end" - parses "@[Foo(1, foo: 2)]" parses "@[Foo(1, foo: 2)]" - says syntax error on "break << 1" says syntax error on "break << 1" - parses "1 ? a : b" parses "1 ? a : b" - parses "def ~(); end;" parses "def ~(); end;" - says syntax error on "def foo var\n end" says syntax error on "def foo var\n end" - says syntax error on "module Foo%x()" says syntax error on "module Foo%x()" - parses "<<-HERE\nHERE" parses "<<-HERE\nHERE" - says syntax error on "def foo(foo typeof); end" says syntax error on "def foo(foo typeof); end" - parses "foo = 1; ->foo.===(Int32)" parses "foo = 1; ->foo.===(Int32)" - parses "lib LibC\n$errno : B, C -> D\nend" parses "lib LibC\n$errno : B, C -> D\nend" - parses "case 1\nin Int32.class; 2; end" parses "case 1\nin Int32.class; 2; end" - parses "foo.>=(1, 2) { 3 }" parses "foo.>=(1, 2) { 3 }" - parses "foo = 1; ->foo.==(Int32)" parses "foo = 1; ->foo.==(Int32)" - says syntax error on "%i(" says syntax error on "%i(" - says syntax error on "foo(**bar, *x)" says syntax error on "foo(**bar, *x)" - parses "macro foo\n\"\\'\"\nend" parses "macro foo\n\"\\'\"\nend" - says syntax error on "next[0]= 1" says syntax error on "next[0]= 1" - says syntax error on "Foo(T, U V)" says syntax error on "Foo(T, U V)" - parses "macro foo(@[Foo] outer inner);end" parses "macro foo(@[Foo] outer inner);end" - parses "macro foo(x)\n 1 + 2; end" parses "macro foo(x)\n 1 + 2; end" - parses "1 -2" parses "1 -2" - parses "def foo(bar = 1\n); 2; end" parses "def foo(bar = 1\n); 2; end" - parses "def -(); end;" parses "def -(); end;" - says syntax error on "foo[1] = return" says syntax error on "foo[1] = return" - parses "def foo(@in); end" parses "def foo(@in); end" - parses "module Foo :Bar end" parses "module Foo :Bar end" - parses "property struct : Int32" parses "property struct : Int32" - says syntax error on "fun foo\nFoo = 1" says syntax error on "fun foo\nFoo = 1" - parses "(1)\nif true; end" parses "(1)\nif true; end" - parses "property asm : Int32" parses "property asm : Int32" - parses "foo(1.., 2)" parses "foo(1.., 2)" - parses "def foo(x @select); end" parses "def foo(x @select); end" - parses "foo.bar(1).baz" parses "foo.bar(1).baz" - parses "a = 1; a **=\n1" parses "a = 1; a **=\n1" - parses "next" parses "next" - parses "1 ? 2 : 3" parses "1 ? 2 : 3" - parses "{{ foo.nil?(foo) }}" parses "{{ foo.nil?(foo) }}" - parses "1 * 2" parses "1 * 2" - says syntax error on "<<-HERE\n One\n \#{1}\n wrong\n HERE" says syntax error on "<<-HERE\n One\n \#{1}\n wrong\n HERE" - parses "foo &.bar.baz" parses "foo &.bar.baz" - parses "foo./(1, 2)" parses "foo./(1, 2)" - parses "{% begin %}%Q{ %s }{% end %}" parses "{% begin %}%Q{ %s }{% end %}" - parses "foo(0, n * 2)" parses "foo(0, n * 2)" - parses "enum Foo; macro foo;end; end" parses "enum Foo; macro foo;end; end" - parses "foo(regex: //)" parses "foo(regex: //)" - says syntax error on "if next; end" says syntax error on "if next; end" - says syntax error on "{\n}" says syntax error on "{\n}" - parses "def foo(x, *y); 1; end" parses "def foo(x, *y); 1; end" - parses "foo(n &+ 2)" parses "foo(n &+ 2)" - parses "def foo(@alias); end" parses "def foo(@alias); end" - parses "foo = 1; ->foo.^(Int32)" parses "foo = 1; ->foo.^(Int32)" - says syntax error on "break <= 1" says syntax error on "break <= 1" - parses "&- 1" parses "&- 1" - says syntax error on "<<-HEREDOC\n" says syntax error on "<<-HEREDOC\n" - says syntax error on "case when .foo? then 1; end" says syntax error on "case when .foo? then 1; end" - parses "foo(/a/)" parses "foo(/a/)" - parses "macro foo;bar{% if x %}body{% elsif y %}body2{% else %}body3{%end%}baz;end" parses "macro foo;bar{% if x %}body{% elsif y %}body2{% else %}body3{%end%}baz;end" - parses "{[] of Foo, Bar::Baz ** 2}" parses "{[] of Foo, Bar::Baz ** 2}" - parses "struct Foo include Bar end" parses "struct Foo include Bar end" - parses "foo = 1; ->foo./(Int32)" parses "foo = 1; ->foo./(Int32)" - parses "{% a = 1 %}" parses "{% a = 1 %}" - parses "foo(z: 0, a: n + 2)" parses "foo(z: 0, a: n + 2)" - sets location of lib fun name sets location of lib fun name - parses "def foo(var : Char[256]); end" parses "def foo(var : Char[256]); end" - parses "foo &.@bar.@baz" parses "foo &.@bar.@baz" - parses "def foo(x @until); end" parses "def foo(x @until); end" - says syntax error on "def foo(foo if); end" says syntax error on "def foo(foo if); end" - says syntax error on "foo { |yield| }" says syntax error on "foo { |yield| }" - parses "foo.=~ do end" parses "foo.=~ do end" - says syntax error on "next &* 1" says syntax error on "next &* 1" - says syntax error on "def Foo(Int32).bar;end" says syntax error on "def Foo(Int32).bar;end" - says syntax error on "a = 1; b = 2; a, b += 1, 2" says syntax error on "a = 1; b = 2; a, b += 1, 2" - says syntax error on "\"hello\" foo" says syntax error on "\"hello\" foo" - parses "def foo(x @typeof); end" parses "def foo(x @typeof); end" - says syntax error on "foo[0]? += 1" says syntax error on "foo[0]? += 1" - parses "abstract def foo" parses "abstract def foo" - says syntax error on "lib Foo; enum Bar->(x : Qux){}" says syntax error on "lib Foo; enum Bar->(x : Qux){}" - says syntax error on "def foo(foo in); end" says syntax error on "def foo(foo in); end" - parses "\"hello \\\n world\"" parses "\"hello \\\n world\"" - parses "foo[0] = 1" parses "foo[0] = 1" - sets correct location of instance variable in proc pointer sets correct location of instance variable in proc pointer - parses "2 * 3 + 4 * 5" parses "2 * 3 + 4 * 5" - parses "{% begin %}%r<\\A>{% end %}" parses "{% begin %}%r<\\A>{% end %}" - says syntax error on "foo[1] = break" says syntax error on "foo[1] = break" - says syntax error on "foo { |(macro)| }" says syntax error on "foo { |(macro)| }" - parses "foo.& do end" parses "foo.& do end" - parses "foo &.as?(T)" parses "foo &.as?(T)" - parses "1 &** 2" parses "1 &** 2" - parses "macro foo\n\"\\\\\"\nend" parses "macro foo\n\"\\\\\"\nend" - parses "a; if / /; / /; elsif / /; / /; end" parses "a; if / /; / /; elsif / /; / /; end" - parses ":foo!" parses ":foo!" - parses "foo = 1; ->foo.&*(Int32)" parses "foo = 1; ->foo.&*(Int32)" - parses "foo result : Int32; result" parses "foo result : Int32; result" - parses "def foo(def foo); end" parses "def foo(def foo); end" - parses "->@@foo.foo" parses "->@@foo.foo" - parses "def foo(@[Foo] @[Bar] var : Int32); end" parses "def foo(@[Foo] @[Bar] var : Int32); end" - parses "<<-'HERE COMES HEREDOC'\n hello \\n world\n \#{1}\n HERE COMES HEREDOC" parses "<<-'HERE COMES HEREDOC'\n hello \\n world\n \#{1}\n HERE COMES HEREDOC" - says syntax error on "def foo(foo protected); end" says syntax error on "def foo(foo protected); end" - says syntax error on "foo(1, 2, 3 end" says syntax error on "foo(1, 2, 3 end" - parses "foo.===" parses "foo.===" - parses "def ==; end;" parses "def ==; end;" - parses "Foo(X, instance_alignof(Int32))" parses "Foo(X, instance_alignof(Int32))" - parses "n - 2" parses "n - 2" - parses "1 % 2" parses "1 % 2" - parses "foo %i" parses "foo %i" - parses "a : Foo" parses "a : Foo" - says syntax error on "def foo(*x, &x); end" says syntax error on "def foo(*x, &x); end" - parses "def foo(x @module); end" parses "def foo(x @module); end" - parses "a\nunless / /\n/ /\nelse\n/ /\nend" parses "a\nunless / /\n/ /\nelse\n/ /\nend" - parses "{% 2 unless 1; 3 %}" parses "{% 2 unless 1; 3 %}" - parses "begin; 1; rescue Foo | Bar; 2; end" parses "begin; 1; rescue Foo | Bar; 2; end" - says syntax error on "macro foo(x y z); end" says syntax error on "macro foo(x y z); end" - parses "a = uninitialized Foo; a" parses "a = uninitialized Foo; a" - parses "a = 1; yield a ensure a" parses "a = 1; yield a ensure a" - parses "def foo; end; if false; 1; else; 2; end" parses "def foo; end; if false; 1; else; 2; end" - says syntax error on "lib Foo->{}" says syntax error on "lib Foo->{}" - parses "struct Foo \"a\" end" parses "struct Foo \"a\" end" - parses "foo(n !~ 2)" parses "foo(n !~ 2)" - parses "foo(a: 1, b: 2)" parses "foo(a: 1, b: 2)" - parses "foo(a: n % 2)" parses "foo(a: n % 2)" - parses "module Foo %() end" parses "module Foo %() end" - parses "a.[] = 1" parses "a.[] = 1" - parses "1 unless 3" parses "1 unless 3" - parses "foo[\n1\n]" parses "foo[\n1\n]" - parses "lib LibC\nend" parses "lib LibC\nend" - parses "begin; 1; rescue; 2; end" parses "begin; 1; rescue; 2; end" - parses "property class : Int32" parses "property class : Int32" - parses "def **; end;" parses "def **; end;" - parses "def foo(x @if); end" parses "def foo(x @if); end" - says syntax error on "class Foo{|a|a}" says syntax error on "class Foo{|a|a}" - parses "foo x, y do\nend" parses "foo x, y do\nend" - parses "nil : Int32" parses "nil : Int32" - says syntax error on "yield break" says syntax error on "yield break" - parses "asm : Int32" parses "asm : Int32" - parses "foo = 1; foo -1" parses "foo = 1; foo -1" - says syntax error on "return >> 1" says syntax error on "return >> 1" - parses "protected : Int32" parses "protected : Int32" - says syntax error on " {1 => end" says syntax error on " {1 => end" - parses "foo { |a, (b, c), (d, e)| a; b; c; d; e }" parses "foo { |a, (b, c), (d, e)| a; b; c; d; e }" - says syntax error on "+return" says syntax error on "+return" - parses "1..\n2.." parses "1..\n2.." - parses "struct : Int32" parses "struct : Int32" - says syntax error on "->(x : Int32, x : Int32) {}" says syntax error on "->(x : Int32, x : Int32) {}" - parses "<<-HERE1; <<-HERE2\nHERE1\nhere2\nHERE2" parses "<<-HERE1; <<-HERE2\nHERE1\nhere2\nHERE2" - parses "{{ foo }}" parses "{{ foo }}" - says syntax error on "foo(1 2)" says syntax error on "foo(1 2)" - parses "break {1 => 2}" parses "break {1 => 2}" - says syntax error on "def foo &block ; end" says syntax error on "def foo &block ; end" - parses "property until : Int32" parses "property until : Int32" - parses "def foo;{{@type}};end" parses "def foo;{{@type}};end" - parses "def *(); end;" parses "def *(); end;" - says syntax error on "foo { |(struct)| }" says syntax error on "foo { |(struct)| }" - parses "1 * -2" parses "1 * -2" - parses "Foo({X, Y})" parses "Foo({X, Y})" - parses ":!" parses ":!" - says syntax error on "foo { |macro| }" says syntax error on "foo { |macro| }" - parses "extend Foo\nif true; end" parses "extend Foo\nif true; end" - parses "foo(z: 0, a: n === 2)" parses "foo(z: 0, a: n === 2)" - parses "break *1" parses "break *1" - parses "break" parses "break" - parses "foo(n > 2)" parses "foo(n > 2)" - says syntax error on "def foo(foo fun); end" says syntax error on "def foo(foo fun); end" - says syntax error on "def foo(**args, *x); end" says syntax error on "def foo(**args, *x); end" - says syntax error on "foo { |(out)| }" says syntax error on "foo { |(out)| }" - parses "lib LibC; type A = B; end" parses "lib LibC; type A = B; end" - says syntax error on "next + 1" says syntax error on "next + 1" - parses "pointerof : Int32" parses "pointerof : Int32" - parses "foo = 1; foo +1" parses "foo = 1; foo +1" - says syntax error on "def foo(foo macro); end" says syntax error on "def foo(foo macro); end" - says syntax error on "def foo(x : Array({sizeof(Int32), 2})); end" says syntax error on "def foo(x : Array({sizeof(Int32), 2})); end" - parses "foo(a: n >= 2)" parses "foo(a: n >= 2)" - parses "a ? 1\n : b" parses "a ? 1\n : b" - parses "def foo(fun foo); end" parses "def foo(fun foo); end" - parses "puts __FILE__" parses "puts __FILE__" - parses "a ? 1 :\n b ? 2 :\n c ? 3\n : 0" parses "a ? 1 :\n b ? 2 :\n c ? 3\n : 0" - parses "foo%i" parses "foo%i" - parses "foo % Q()" parses "foo % Q()" - says syntax error on "return &- 1" says syntax error on "return &- 1" - parses "a = 1; a |=\n1" parses "a = 1; a |=\n1" - parses "foo.& 1, 2" parses "foo.& 1, 2" - parses "def +(); end" parses "def +(); end" - parses "def foo(x @var); end" parses "def foo(x @var); end" - parses "pointerof(@a)" parses "pointerof(@a)" - parses "true" parses "true" - says syntax error on "{a: 1, a: 2}" says syntax error on "{a: 1, a: 2}" - parses "module Foo [1] end" parses "module Foo [1] end" - says syntax error on "fun Foo : Int64\nend" says syntax error on "fun Foo : Int64\nend" - parses ":\"\"" parses ":\"\"" - parses "foo(0, n - 2)" parses "foo(0, n - 2)" - parses "foo.**(1, 2)" parses "foo.**(1, 2)" - parses "case {1}\nin {.bar?}; 2; end" parses "case {1}\nin {.bar?}; 2; end" - says syntax error on "{% unless 1; 2; elsif 3; 4; end %}" says syntax error on "{% unless 1; 2; elsif 3; 4; end %}" - parses "/foo/imximx" parses "/foo/imximx" - parses "lib LibC; type A = B.class; end" parses "lib LibC; type A = B.class; end" - parses "property alias : Int32" parses "property alias : Int32" - says syntax error on "class Foo < Bar%w()" says syntax error on "class Foo < Bar%w()" - parses "struct Foo [1] end" parses "struct Foo [1] end" - parses "def /; end;" parses "def /; end;" - parses "Foo(T, U, 1)" parses "Foo(T, U, 1)" - parses "def foo(@@var = 1); 1; end" parses "def foo(@@var = 1); 1; end" - says syntax error on "foo &.bar.[] 0 = 1" says syntax error on "foo &.bar.[] 0 = 1" - parses "def foo(x = 1, **args)\n1\nend" parses "def foo(x = 1, **args)\n1\nend" - parses "{} of Int => Double" parses "{} of Int => Double" - says syntax error on "def foo(yield); end" says syntax error on "def foo(yield); end" - parses "a ? 1 : b ? 2 : c ? 3 : 0" parses "a ? 1 : b ? 2 : c ? 3 : 0" - says syntax error on "def foo(instance_sizeof); end" says syntax error on "def foo(instance_sizeof); end" - parses "{% begin %}%q[ %s ]{% end %}" parses "{% begin %}%q[ %s ]{% end %}" - parses "A = 1" parses "A = 1" - parses "\"hello \" \\\n \"world\"" parses "\"hello \" \\\n \"world\"" - parses "macro foo; 1 + 2 {{ foo }} 3 + 4; end" parses "macro foo; 1 + 2 {{ foo }} 3 + 4; end" - parses "1 rescue 2 if 3" parses "1 rescue 2 if 3" - parses "def self.&(); end;" parses "def self.&(); end;" - parses "class Foo < self; end" parses "class Foo < self; end" - says syntax error on "break < 1" says syntax error on "break < 1" - parses "(/ /)" parses "(/ /)" - parses "self : Int32" parses "self : Int32" - parses "def foo(@case); end" parses "def foo(@case); end" - says syntax warning on "macro foo(foo bar!); end" says syntax warning on "macro foo(foo bar!); end" - parses "a { |x| x } / b" parses "a { |x| x } / b" - parses "foo +1_i64" parses "foo +1_i64" - parses ":==" parses ":==" - parses "`foo\#{1}bar`" parses "`foo\#{1}bar`" - parses "def foo(@include); end" parses "def foo(@include); end" - parses "{% if 1; 2; end %}" parses "{% if 1; 2; end %}" - says syntax error on "module Foo; require \"bar\"; end" says syntax error on "module Foo; require \"bar\"; end" - parses "property return : Int32" parses "property return : Int32" - says syntax error on "{\"x\": [] of Int32,\n}\n1.foo(" says syntax error on "{\"x\": [] of Int32,\n}\n1.foo(" - parses "class Foo(T); end" parses "class Foo(T); end" - says syntax error on "def foo(self); end" says syntax error on "def foo(self); end" - says syntax error on "foo(foo(&.block)" says syntax error on "foo(foo(&.block)" - parses "foo.^(1, 2) { 3 }" parses "foo.^(1, 2) { 3 }" - parses "until : Int32" parses "until : Int32" - parses "foo./ 1, 2" parses "foo./ 1, 2" - parses "->::foo?" parses "->::foo?" - parses "foo(/ /)" parses "foo(/ /)" - parses "yield 1 if true" parses "yield 1 if true" - parses "foo &.baz.qux do\nend" parses "foo &.baz.qux do\nend" - parses "foo.[]=(1, 2) { 3 }" parses "foo.[]=(1, 2) { 3 }" - says syntax error on "1 unless return" says syntax error on "1 unless return" - parses "property sizeof : Int32" parses "property sizeof : Int32" - parses "x[+ 1]" parses "x[+ 1]" - parses "foo(z: 0, a: n % 2)" parses "foo(z: 0, a: n % 2)" - parses "def foo(var : Int32 = 1); end" parses "def foo(var : Int32 = 1); end" - says syntax error on "foo { |(abstract)| }" says syntax error on "foo { |(abstract)| }" - parses "lib LibC\nfun getchar(Int, Float)\nend" parses "lib LibC\nfun getchar(Int, Float)\nend" - sets correct location of `else` of unless statement sets correct location of `else` of unless statement - parses "foo = 1; ->foo.|(Int32)" parses "foo = 1; ->foo.|(Int32)" - parses "def foo(@@lib); end" parses "def foo(@@lib); end" - parses "call foo : A, end : B" parses "call foo : A, end : B" - parses "property nil : Int32" parses "property nil : Int32" - parses "foo.* do end" parses "foo.* do end" - parses "foo(**bar)" parses "foo(**bar)" - says syntax error on " {1, 2, 3 end" says syntax error on " {1, 2, 3 end" - parses "foo.!( )" parses "foo.!( )" - says syntax error on "lib Foo; enum Bar:qux" says syntax error on "lib Foo; enum Bar:qux" - says syntax error on "break >= 1" says syntax error on "break >= 1" - parses "foo.- 1, 2" parses "foo.- 1, 2" - parses "->::Foo.foo=" parses "->::Foo.foo=" - says syntax error on "if 1\n foo 1,\nend" says syntax error on "if 1\n foo 1,\nend" - says syntax error on "struct Foo:Qux" says syntax error on "struct Foo:Qux" - says syntax error on "next // 1" says syntax error on "next // 1" - says syntax error on "Hash{\"foo\": 1}" says syntax error on "Hash{\"foo\": 1}" - parses "def %; end;" parses "def %; end;" - parses "def &**(); end" parses "def &**(); end" - parses "a : Foo = 1" parses "a : Foo = 1" - parses "enum Foo : UInt16 ; end" parses "enum Foo : UInt16 ; end" - says syntax error on "class Foo < Bar{|a|a}" says syntax error on "class Foo < Bar{|a|a}" - parses "def self.|(); end;" parses "def self.|(); end;" - parses "x[..2]" parses "x[..2]" - says syntax error on "Foo(T, x: U)" says syntax error on "Foo(T, x: U)" - says syntax error on "{\n1 => 2, 3 => 4\n5 => 6}" says syntax error on "{\n1 => 2, 3 => 4\n5 => 6}" - parses "foo bar!" parses "foo bar!" - parses "def /(); end" parses "def /(); end" - says syntax error on "*a, 1 = 2" says syntax error on "*a, 1 = 2" - parses "foo &.block(1)" parses "foo &.block(1)" - says syntax error on "def foo(class); end" says syntax error on "def foo(class); end" - sets correct location and end location of parenthesized empty block sets correct location and end location of parenthesized empty block - parses "def foo(@@include); end" parses "def foo(@@include); end" - parses "x, y, z = <<-FOO, <<-BAR, <<-BAZ\nhello\nFOO\nworld\nBAR\n!\nBAZ" parses "x, y, z = <<-FOO, <<-BAR, <<-BAZ\nhello\nFOO\nworld\nBAR\n!\nBAZ" - parses "{% begin %}%x| %s |{% end %}" parses "{% begin %}%x| %s |{% end %}" - says syntax error on "+break" says syntax error on "+break" - parses "def >>(); end" parses "def >>(); end" - parses "@a : Foo | Int32" parses "@a : Foo | Int32" - parses "foo(&.as(T))" parses "foo(&.as(T))" - says syntax error on "<<-FOO\n1\nFOO + 2" says syntax error on "<<-FOO\n1\nFOO + 2" - says syntax error on "a() = 1" says syntax error on "a() = 1" - parses "{% begin %}%q{ %s }{% end %}" parses "{% begin %}%q{ %s }{% end %}" - sets correct location of proc literal sets correct location of proc literal - parses "def foo(x @@begin); end" parses "def foo(x @@begin); end" - parses "macro foo; 1 + 2 {{foo}} 3 + 4; end" parses "macro foo; 1 + 2 {{foo}} 3 + 4; end" - parses "lib LibC; fun foo : Int**; end" parses "lib LibC; fun foo : Int**; end" - parses "def foo(@@begin); end" parses "def foo(@@begin); end" - parses "foo(0, n > 2)" parses "foo(0, n > 2)" - doesn't override yield with macro yield doesn't override yield with macro yield - parses "def >=(); end;" parses "def >=(); end;" - says syntax error on "foo { |asm| }" says syntax error on "foo { |asm| }" - says syntax error on "enum Foo%x()" says syntax error on "enum Foo%x()" - parses "break if true" parses "break if true" - parses "foo.%" parses "foo.%" - parses "::Foo{\"x\" => \"y\"}" parses "::Foo{\"x\" => \"y\"}" - parses "class Foo include Bar end" parses "class Foo include Bar end" - says syntax error on "foo(&block) {}" says syntax error on "foo(&block) {}" - parses "foo = 1; ->foo.!~(Int32)" parses "foo = 1; ->foo.!~(Int32)" - parses "def foo(x @@var); end" parses "def foo(x @@var); end" - parses "/=/" parses "/=/" - says syntax error on "def foo(select); end" says syntax error on "def foo(select); end" - says syntax error on "Foo(X\n,Y)" says syntax error on "Foo(X\n,Y)" - says syntax error on "a = break" says syntax error on "a = break" - parses "{% begin %}%( %s ){% end %}" parses "{% begin %}%( %s ){% end %}" - says syntax error on "break &** 1" says syntax error on "break &** 1" - says syntax error on "foo { |(module)| }" says syntax error on "foo { |(module)| }" - parses "Int[]" parses "Int[]" - says syntax error on "case 1\nin .nil?; 2" says syntax error on "case 1\nin .nil?; 2" - says syntax error on "struct Foo\"a\"" says syntax error on "struct Foo\"a\"" - parses "def foo(&block : Int ->\n); end" parses "def foo(&block : Int ->\n); end" - parses "property abstract : Int32" parses "property abstract : Int32" - parses "foo(0, n =~ 2)" parses "foo(0, n =~ 2)" - says syntax error on "foo { |a b| }" says syntax error on "foo { |a b| }" - says syntax error on "foo { |with| }" says syntax error on "foo { |with| }" - says syntax error on "def foo(var = 1 : Int32); end" says syntax error on "def foo(var = 1 : Int32); end" - says syntax error on "foo { |break| }" says syntax error on "foo { |break| }" - parses "def foo(&\n); end" parses "def foo(&\n); end" - says syntax error on "lib Foo{|a|a}" says syntax error on "lib Foo{|a|a}" - parses "def foo(x @@module); end" parses "def foo(x @@module); end" - parses "a = 1; pointerof(a)" parses "a = 1; pointerof(a)" - parses "property lib : Int32" parses "property lib : Int32" - parses "foo(a: n & 2)" parses "foo(a: n & 2)" - parses "1.as?(\n Int32\n)" parses "1.as?(\n Int32\n)" - parses "foo(&.as(T).bar)" parses "foo(&.as(T).bar)" - parses "a = 1; a +=\n1" parses "a = 1; a +=\n1" - parses "{foo:a, bar:b}" parses "{foo:a, bar:b}" - parses "def >; end;" parses "def >; end;" - parses "next if true" parses "next if true" - parses "def Foo::Bar.foo\n1\nend" parses "def Foo::Bar.foo\n1\nend" - says syntax error on "lib Foo{1}" says syntax error on "lib Foo{1}" - says syntax error on "def foo(foo out); end" says syntax error on "def foo(foo out); end" - says syntax error on "foo { |(return)| }" says syntax error on "foo { |(return)| }" - parses "def foo; a = 1; a; end" parses "def foo; a = 1; a; end" - parses "n === 2" parses "n === 2" - parses "def foo(@private); end" parses "def foo(@private); end" - parses "def foo(private foo); end" parses "def foo(private foo); end" - parses "def foo(@true); end" parses "def foo(@true); end" - parses "[] of ->\n1" parses "[] of ->\n1" - parses "def foo(@while); end" parses "def foo(@while); end" - says syntax error on "class Foo < Bar\"a\"" says syntax error on "class Foo < Bar\"a\"" - parses "a = 1; a %=\n1" parses "a = 1; a %=\n1" - parses "module : Int32" parses "module : Int32" - parses "1 < 2" parses "1 < 2" - parses "foo(bar?)" parses "foo(bar?)" - says syntax error on "def foo(struct); end" says syntax error on "def foo(struct); end" - says syntax error on "macro foo" says syntax error on "macro foo" - parses "def foo(&block); end" parses "def foo(&block); end" - says syntax error on "*a, b, c, d, e = 1, 2" says syntax error on "*a, b, c, d, e = 1, 2" - says syntax error on "annotation Foo:Qux" says syntax error on "annotation Foo:Qux" - parses "%r(/)" parses "%r(/)" - parses "a, *b = 1, 2" parses "a, *b = 1, 2" - parses "case {1}\nin {Int32}; 2; end" parses "case {1}\nin {Int32}; 2; end" - says syntax error on "def foo(require); end" says syntax error on "def foo(require); end" - says syntax error on "a() += 1" says syntax error on "a() += 1" - global regex match data - says syntax error on "$0, a = {1, 2}" says syntax error on "$0, a = {1, 2}" - parses "$?" parses "$?" - parses "$1" parses "$1" - parses "foo $1" parses "foo $1" - parses "$~.foo" parses "$~.foo" - parses "$1?" parses "$1?" - says syntax error on "$0, $1 = [1, 2]" says syntax error on "$0, $1 = [1, 2]" - says syntax error on "$0 = 1" says syntax error on "$0 = 1" - parses "$? = 1" parses "$? = 1" - parses "foo $?" parses "foo $?" - says syntax error on "$2147483648" says syntax error on "$2147483648" - parses "$~ = 1" parses "$~ = 1" - parses "$~" parses "$~" - parses "$0" parses "$0" - parses "$?.foo" parses "$?.foo" - says syntax error on "$99999999999999999999999?" says syntax error on "$99999999999999999999999?" - parses "lib LibC; struct Foo; x : Int**; end end" parses "lib LibC; struct Foo; x : Int**; end end" - parses "a = 1; a >>=\n1" parses "a = 1; a >>=\n1" - parses "n &- 2" parses "n &- 2" - parses "def >=; end;" parses "def >=; end;" - parses "a = 1; a -= 1" parses "a = 1; a -= 1" - says syntax error on "def foo(nil); end" says syntax error on "def foo(nil); end" - says syntax error on "class Foo:Qux" says syntax error on "class Foo:Qux" - says syntax error on "class Foo:qux" says syntax error on "class Foo:qux" - says syntax error on "class Foo(T, U V)" says syntax error on "class Foo(T, U V)" - parses "foo.**(1, 2) { 3 }" parses "foo.**(1, 2) { 3 }" - parses "def foo(var1, var2); end" parses "def foo(var1, var2); end" - says syntax error on "{\"a\" : 1}" says syntax error on "{\"a\" : 1}" - says syntax error on "a.[] 0 = 1" says syntax error on "a.[] 0 = 1" - parses "()" parses "()" - parses "a.b >>=\n1" parses "a.b >>=\n1" - says syntax error on "return === 1" says syntax error on "return === 1" - parses "Foo(T)" parses "Foo(T)" - says syntax error on "macro foo;{%end};end" says syntax error on "macro foo;{%end};end" - says syntax error on "return.as(Int32)" says syntax error on "return.as(Int32)" - parses "return *1" parses "return *1" - says syntax error on "{a[]: 1}" says syntax error on "{a[]: 1}" - parses "def foo(begin foo); end" parses "def foo(begin foo); end" - parses "case 1\nwhen .foo\n2\nend" parses "case 1\nwhen .foo\n2\nend" - parses "def ^(); end" parses "def ^(); end" - parses "foo.** 1, 2" parses "foo.** 1, 2" - says syntax error on "class Foo < Bar{1}" says syntax error on "class Foo < Bar{1}" - parses "2 * (3 + 4)" parses "2 * (3 + 4)" - parses "n &** 2" parses "n &** 2" - parses "def ~; end;" parses "def ~; end;" - says syntax error on "lib Foo; enum Bar:Qux" says syntax error on "lib Foo; enum Bar:Qux" - parses "x[a: 1, b: 2]" parses "x[a: 1, b: 2]" - parses "1.as? Bar" parses "1.as? Bar" - says syntax error on "a.b, c.d() = 1" says syntax error on "a.b, c.d() = 1" - says syntax error on "a.b(), c.d = 1" says syntax error on "a.b(), c.d = 1" - parses "select\nwhen foo\n2\nwhen bar\n4\nend" parses "select\nwhen foo\n2\nwhen bar\n4\nend" - parses "return *1, 2" parses "return *1, 2" - parses "def foo(@[Foo] var : Int32); end" parses "def foo(@[Foo] var : Int32); end" - says syntax error on "%i{one}}" says syntax error on "%i{one}}" - parses "->Foo.<=(Int32)" parses "->Foo.<=(Int32)" - says syntax error on "def foo(lib); end" says syntax error on "def foo(lib); end" - parses "1\\\n + 2" parses "1\\\n + 2" - says syntax error on "enum Foo{1}" says syntax error on "enum Foo{1}" - says syntax error on "return[0]= 1" says syntax error on "return[0]= 1" - parses "abstract def foo\n1" parses "abstract def foo\n1" - says syntax error on "1 unless break" says syntax error on "1 unless break" - parses "{% begin %}%Q| %s |{% end %}" parses "{% begin %}%Q| %s |{% end %}" - says syntax error on "1 ... break" says syntax error on "1 ... break" - sets correct location of var in proc pointer sets correct location of var in proc pointer - parses "def foo(next foo); end" parses "def foo(next foo); end" - says syntax error on "enum Foo : Int32%w()" says syntax error on "enum Foo : Int32%w()" - parses "property unless : Int32" parses "property unless : Int32" - says syntax error on "module Foo->(x : Qux){}" says syntax error on "module Foo->(x : Qux){}" - says syntax error on "def foo(fun); end" says syntax error on "def foo(fun); end" - says syntax error on "foo { |(typeof)| }" says syntax error on "foo { |(typeof)| }" - parses "foo(*{1})" parses "foo(*{1})" - says syntax error on "foo { |(a b)| }" says syntax error on "foo { |(a b)| }" - says syntax error on " (1, 2, 3 end" says syntax error on " (1, 2, 3 end" - parses ":[]" parses ":[]" - parses "def foo(@fun); end" parses "def foo(@fun); end" - parses "unless foo; 1; end" parses "unless foo; 1; end" - parses "1 !~ 2" parses "1 !~ 2" - parses "macro foo\neenum\nend" parses "macro foo\neenum\nend" - says syntax error on "foo { |(nil)| }" says syntax error on "foo { |(nil)| }" - parses "foo.bar" parses "foo.bar" - says syntax error on ":bar foo" says syntax error on ":bar foo" - parses "foo.> do end" parses "foo.> do end" - says syntax error on "macro foo x\n 1 + 2; end" says syntax error on "macro foo x\n 1 + 2; end" - parses "def >=(); end" parses "def >=(); end" - parses "while : Int32" parses "while : Int32" - parses "foo.responds_to? :foo" parses "foo.responds_to? :foo" - parses "1 && 2" parses "1 && 2" - sets location of += sets location of += - parses "def foo(@[Foo] *args); end" parses "def foo(@[Foo] *args); end" - parses "foo(\n1\n)" parses "foo(\n1\n)" - parses "x = 1 rescue 2" parses "x = 1 rescue 2" - parses "foo out _" parses "foo out _" - parses "def foo(@if); end" parses "def foo(@if); end" - parses "require \"foo\"; [1]" parses "require \"foo\"; [1]" - parses "struct Foo %x() end" parses "struct Foo %x() end" - says syntax error on "annotation Foo->{}" says syntax error on "annotation Foo->{}" - parses "def foo(@sizeof); end" parses "def foo(@sizeof); end" - parses "def foo(x @class); end" parses "def foo(x @class); end" - parses "class Foo(T, *U); end" parses "class Foo(T, *U); end" - parses "class Foo :Bar end" parses "class Foo :Bar end" - parses "a = 1; a &+= 1" parses "a = 1; a &+= 1" - parses "struct Foo %() end" parses "struct Foo %() end" - parses "class Foo \"a\" end" parses "class Foo \"a\" end" - says syntax error on "lib Foo; struct Bar{|a|a}" says syntax error on "lib Foo; struct Bar{|a|a}" - parses "%r(\\ )" parses "%r(\\ )" - says syntax error on "foo[break]" says syntax error on "foo[break]" - parses "lib LibC\nfun getch = GetChar\nend" parses "lib LibC\nfun getch = GetChar\nend" - parses "def self.*(); end;" parses "def self.*(); end;" - parses "else : Int32" parses "else : Int32" - parses "/ hi /" parses "/ hi /" - says syntax error on "module Foo{1}" says syntax error on "module Foo{1}" - gets corrects end location for var + var gets corrects end location for var + var - parses "a = 1; a >>= 1" parses "a = 1; a >>= 1" - parses "{foo:\"a\", bar:\"b\"}" parses "{foo:\"a\", bar:\"b\"}" - parses "def foo(**args)\n1\nend" parses "def foo(**args)\n1\nend" - parses "[1, 2] of Int" parses "[1, 2] of Int" - parses "1 +\n2" parses "1 +\n2" - parses "def foo(a, & : Int -> Double); end" parses "def foo(a, & : Int -> Double); end" - parses "2 / 3 + 4 / 5" parses "2 / 3 + 4 / 5" - parses "@a, b = 1, 2" parses "@a, b = 1, 2" - parses "foo[0] = 1 if 2" parses "foo[0] = 1 if 2" - parses "+1" parses "+1" - parses "def foo(x : U) forall U; end" parses "def foo(x : U) forall U; end" - parses "x = 1; foo.bar x do\nend" parses "x = 1; foo.bar x do\nend" - parses "def <=; end;" parses "def <=; end;" - parses "1.~" parses "1.~" - parses "%x(`which(foo)`)" parses "%x(`which(foo)`)" - parses "def foo(@@instance_sizeof); end" parses "def foo(@@instance_sizeof); end" - parses "%w{one two}" parses "%w{one two}" - says syntax error on "'''" says syntax error on "'''" - parses "def foo(@@protected); end" parses "def foo(@@protected); end" - sets correct locations of macro if / else sets correct locations of macro if / else - redefine pseudo-method - says syntax error on "macro as?; end" says syntax error on "macro as?; end" - says syntax error on "def self.nil?; end" says syntax error on "def self.nil?; end" - says syntax error on "def as; end" says syntax error on "def as; end" - says syntax error on "def self.as; end" says syntax error on "def self.as; end" - says syntax error on "def self.responds_to?; end" says syntax error on "def self.responds_to?; end" - says syntax error on "def self.!; end" says syntax error on "def self.!; end" - says syntax error on "def self.is_a?; end" says syntax error on "def self.is_a?; end" - says syntax error on "def responds_to?; end" says syntax error on "def responds_to?; end" - says syntax error on "def as?; end" says syntax error on "def as?; end" - says syntax error on "def nil?; end" says syntax error on "def nil?; end" - says syntax error on "macro as; end" says syntax error on "macro as; end" - says syntax error on "def !; end" says syntax error on "def !; end" - says syntax error on "macro nil?; end" says syntax error on "macro nil?; end" - says syntax error on "def is_a?; end" says syntax error on "def is_a?; end" - says syntax error on "macro responds_to?; end" says syntax error on "macro responds_to?; end" - says syntax error on "def self.as?; end" says syntax error on "def self.as?; end" - says syntax error on "macro is_a?; end" says syntax error on "macro is_a?; end" - parses "def foo(); 1; rescue; 2; end" parses "def foo(); 1; rescue; 2; end" - says syntax warning on "foo { |bar?| }" says syntax warning on "foo { |bar?| }" - parses "1\\\r\n + 2" parses "1\\\r\n + 2" - parses "foo%Q" parses "foo%Q" - multiple parameters and blocks for operators ending in `=` - parses "def ==(*args, **opts); end" parses "def ==(*args, **opts); end" - parses "def >=(*args, **opts, &); end" parses "def >=(*args, **opts, &); end" - parses "def []=(*args, **opts, &); end" parses "def []=(*args, **opts, &); end" - parses "def >=(*args, **opts); end" parses "def >=(*args, **opts); end" - parses "def !=(other, file = 1); end" parses "def !=(other, file = 1); end" - parses "def []=(other, file = 1); end" parses "def []=(other, file = 1); end" - parses "def ==(other, file = 1); end" parses "def ==(other, file = 1); end" - parses "def ===(*args, **opts, &); end" parses "def ===(*args, **opts, &); end" - parses "def ==(*args, **opts, &); end" parses "def ==(*args, **opts, &); end" - parses "def !=(*args, **opts); end" parses "def !=(*args, **opts); end" - parses "def >=(other, file = 1); end" parses "def >=(other, file = 1); end" - parses "def <=(other, file = 1); end" parses "def <=(other, file = 1); end" - parses "def !=(*args, **opts, &); end" parses "def !=(*args, **opts, &); end" - parses "def ===(*args, **opts); end" parses "def ===(*args, **opts); end" - parses "def <=(*args, **opts, &); end" parses "def <=(*args, **opts, &); end" - parses "def <=(*args, **opts); end" parses "def <=(*args, **opts); end" - parses "def ===(other, file = 1); end" parses "def ===(other, file = 1); end" - parses "def []=(*args, **opts); end" parses "def []=(*args, **opts); end" - says syntax error on "foo { |while| }" says syntax error on "foo { |while| }" - says syntax error on "break.foo" says syntax error on "break.foo" - sets correct location for output macro expression in for loop sets correct location for output macro expression in for loop - says syntax error on "def foo; require \"bar\"; end" says syntax error on "def foo; require \"bar\"; end" - says syntax error on "def foo(unless); end" says syntax error on "def foo(unless); end" - says syntax error on "foo &.bar.[] 0 =(1)" says syntax error on "foo &.bar.[] 0 =(1)" - parses "foo.nil?" parses "foo.nil?" - parses "T::U/1" parses "T::U/1" - parses "var.@foo.@bar" parses "var.@foo.@bar" - parses "offsetof(\n Foo,\n @foo\n)" parses "offsetof(\n Foo,\n @foo\n)" - parses "foo.% do end" parses "foo.% do end" - parses "foo %r" parses "foo %r" - parses "foo(&.!)" parses "foo(&.!)" - says syntax error on "foo **bar, out x" says syntax error on "foo **bar, out x" - parses "def foo(macro foo); end" parses "def foo(macro foo); end" - parses "foo(a: n // 2)" parses "foo(a: n // 2)" - parses "{% begin %}%w[ %s ]{% end %}" parses "{% begin %}%w[ %s ]{% end %}" - parses "foo(bar do\nend)" parses "foo(bar do\nend)" - parses "lib LibC; Foo = 1; end" parses "lib LibC; Foo = 1; end" - parses ":\"\\\\foo\"" parses ":\"\\\\foo\"" - parses "Int[8, 4,]" parses "Int[8, 4,]" - says syntax error on "%q(" says syntax error on "%q(" - parses "<<-HERE\nHello, mom! I am HERE.\nHER dress is beautiful.\nHE is OK.\n HERESY\nHERE" parses "<<-HERE\nHello, mom! I am HERE.\nHER dress is beautiful.\nHE is OK.\n HERESY\nHERE" - parses "next : Int32" parses "next : Int32" - parses "foo %w()" parses "foo %w()" - parses "foo 1, **bar" parses "foo 1, **bar" - parses "require : Int32" parses "require : Int32" - says syntax error on "foo { |(select)| }" says syntax error on "foo { |(select)| }" - parses "->@foo.foo=" parses "->@foo.foo=" - parses "alias Foo = Bar" parses "alias Foo = Bar" - says syntax error on "Foo(\"\": T)" says syntax error on "Foo(\"\": T)" - parses "ensure : Int32" parses "ensure : Int32" - parses "asm(\"nop\" :: : :)" parses "asm(\"nop\" :: : :)" - says syntax error on "foo { |(offsetof)| }" says syntax error on "foo { |(offsetof)| }" - parses "begin; 1; rescue ::Foo; 2; end" parses "begin; 1; rescue ::Foo; 2; end" - parses "lib LibC; struct Foo; end end" parses "lib LibC; struct Foo; end end" - parses ":&" parses ":&" - parses "Foo({String, ->})" parses "Foo({String, ->})" - parses "macro foo\n <<-FOO\n \#{ %var }\n FOO\nend" parses "macro foo\n <<-FOO\n \#{ %var }\n FOO\nend" - parses "foo(out x); x" parses "foo(out x); x" - parses "def foo(x @@offsetof); end" parses "def foo(x @@offsetof); end" - parses "property extend : Int32" parses "property extend : Int32" - says syntax error on "def foo(x: Int32); end" says syntax error on "def foo(x: Int32); end" - parses "foo %q" parses "foo %q" - parses "!1" parses "!1" - parses "return {1, 2}" parses "return {1, 2}" - parses "def foo(x : U) forall T, U; end" parses "def foo(x : U) forall T, U; end" - `&&` and `||` are not methods - says syntax error on "foo &.&&" says syntax error on "foo &.&&" - says syntax error on "foo &.||()" says syntax error on "foo &.||()" - says syntax error on "foo.&&" says syntax error on "foo.&&" - says syntax error on "foo &.||" says syntax error on "foo &.||" - says syntax error on "foo.&&()" says syntax error on "foo.&&()" - says syntax error on "foo.||" says syntax error on "foo.||" - says syntax error on "foo.||()" says syntax error on "foo.||()" - says syntax error on "foo &.&&()" says syntax error on "foo &.&&()" - parses "def foo(include foo); end" parses "def foo(include foo); end" - parses "pointerof(@a)" parses "pointerof(@a)" - says syntax error on "case break; when 1; end; end" says syntax error on "case break; when 1; end; end" - parses "foo(n <= 2)" parses "foo(n <= 2)" - parses "<<-HERE\r\n One\r\n Zero\r\n HERE" parses "<<-HERE\r\n One\r\n Zero\r\n HERE" - says syntax error on "break ? 1 : 2" says syntax error on "break ? 1 : 2" - parses "def foo(x @unless); end" parses "def foo(x @unless); end" - says syntax error on "false foo" says syntax error on "false foo" - parses "foo./" parses "foo./" - says syntax error on "foo(**bar, 1)" says syntax error on "foo(**bar, 1)" - parses "{\n1,\n2\n}" parses "{\n1,\n2\n}" - says syntax error on "lib Foo\"a\"" says syntax error on "lib Foo\"a\"" - parses "->(x : Int32) : Int32 { }" parses "->(x : Int32) : Int32 { }" - parses "def foo(@enum); end" parses "def foo(@enum); end" - parses "def foo(x @@typeof); end" parses "def foo(x @@typeof); end" - parses "1 rescue 2" parses "1 rescue 2" - says syntax error on "next - 1" says syntax error on "next - 1" - parses "Foo(T | U)" parses "Foo(T | U)" - parses "Foo({*X, *{Y}})" parses "Foo({*X, *{Y}})" - parses "x = 0; a, b = x += 1" parses "x = 0; a, b = x += 1" - parses "class Foo ->(x : Bar){} end" parses "class Foo ->(x : Bar){} end" - says syntax error on "{{ {% begin %} }}" says syntax error on "{{ {% begin %} }}" - parses "def <=(); end" parses "def <=(); end" - parses "foo (1 + 2), 3" parses "foo (1 + 2), 3" - parses "property macro : Int32" parses "property macro : Int32" - says syntax error on "lib Foo%x()" says syntax error on "lib Foo%x()" - parses "::foo" parses "::foo" - parses "n + 2" parses "n + 2" - sets correct location of MacroIf (unless) within another node sets correct location of MacroIf (unless) within another node - parses "class Foo < Bar :Qux end" parses "class Foo < Bar :Qux end" - parses "Foo(\nT,\nU,\n)" parses "Foo(\nT,\nU,\n)" - parses "foo(z: 0, a: n &** 2)" parses "foo(z: 0, a: n &** 2)" - sets correct location and end location of parenthesized block sets correct location and end location of parenthesized block - parses "%i((one two))" parses "%i((one two))" - parses "def foo(x = __DIR__); end" parses "def foo(x = __DIR__); end" - parses "def foo(x, *, y); 1; end" parses "def foo(x, *, y); 1; end" - parses "foo 1.bar do\nend" parses "foo 1.bar do\nend" - says syntax error on "lib Foo; struct Bar->{}" says syntax error on "lib Foo; struct Bar->{}" - parses "{{ foo &.nil? }}" parses "{{ foo &.nil? }}" - says syntax error on "%w(" says syntax error on "%w(" - parses "break 1, 2" parses "break 1, 2" - parses "<<-HERE\r\n One\r\n Zero\r\n HERE\r\n" parses "<<-HERE\r\n One\r\n Zero\r\n HERE\r\n" - parses "{% begin %}%q( %s ){% end %}" parses "{% begin %}%q( %s ){% end %}" - says syntax error on "lib Foo; union Bar->{}" says syntax error on "lib Foo; union Bar->{}" - parses "def &-(); end" parses "def &-(); end" - parses "a, b, *c = 1" parses "a, b, *c = 1" - parses "1.x; foo do\nend" parses "1.x; foo do\nend" - parses "class Foo ->{} end" parses "class Foo ->{} end" - says syntax error on "a.b() = 1" says syntax error on "a.b() = 1" - parses "def foo(var : (Int, Float -> Double)); end" parses "def foo(var : (Int, Float -> Double)); end" - parses "is_a?(Const)" parses "is_a?(Const)" - says syntax error on "def foo &block : Int -> Double ; end" says syntax error on "def foo &block : Int -> Double ; end" - parses "+ 1" parses "+ 1" - parses "{% begin %}%Q( %s ){% end %}" parses "{% begin %}%Q( %s ){% end %}" - says syntax error on "foo[0]? = 1" says syntax error on "foo[0]? = 1" - parses "def foo(@typeof); end" parses "def foo(@typeof); end" - says syntax error on "def foo(x @x); 1; end" says syntax error on "def foo(x @x); 1; end" - says syntax error on "foo &.[] 0 = 1" says syntax error on "foo &.[] 0 = 1" - suffix `if`/`unless` in macros after macro var - parses "macro foo;unless %var;true;end;end" parses "macro foo;unless %var;true;end;end" - parses "macro foo;var unless true;end" parses "macro foo;var unless true;end" - parses "macro foo;if var;true;end;end" parses "macro foo;if var;true;end;end" - parses "macro foo;if %var;true;end;end" parses "macro foo;if %var;true;end;end" - parses "macro foo;%var if true;end" parses "macro foo;%var if true;end" - parses "macro foo;unless var;true;end;end" parses "macro foo;unless var;true;end;end" - parses "macro foo;var if true;end" parses "macro foo;var if true;end" - parses "macro foo;%var unless true;end" parses "macro foo;%var unless true;end" - parses "x[0] ? 1 : 0" parses "x[0] ? 1 : 0" - parses "def =~; end" parses "def =~; end" - says syntax error on "x : String, a = 4" says syntax error on "x : String, a = 4" - parses "foo(out @x); @x" parses "foo(out @x); @x" - says syntax error on "{1 => 2\n,3 => 4}" says syntax error on "{1 => 2\n,3 => 4}" - says syntax error on "return // 1" says syntax error on "return // 1" - parses "foo(bar:a, baz:b)" parses "foo(bar:a, baz:b)" - parses "begin 1 end / 2" parses "begin 1 end / 2" - parses "foo(0, n <= 2)" parses "foo(0, n <= 2)" - says syntax error on "break * 1" says syntax error on "break * 1" - parses "property end : Int32" parses "property end : Int32" - says syntax error on "def =\nend" says syntax error on "def =\nend" - parses "n =~ 2" parses "n =~ 2" - parses "{% begin %}%q| %s |{% end %}" parses "{% begin %}%q| %s |{% end %}" - parses "def foo(x @@instance_sizeof); end" parses "def foo(x @@instance_sizeof); end" - says syntax error on "def foo :String\nend" says syntax error on "def foo :String\nend" - parses "(1 .. )" parses "(1 .. )" - parses "property def : Int32" parses "property def : Int32" - says syntax error on "require 1" says syntax error on "require 1" - parses "a = 1; b = 2; c = 3; a-b -c" parses "a = 1; b = 2; c = 3; a-b -c" - says syntax error on "next * 1" says syntax error on "next * 1" - parses "{% begin %}%x[ %s ]{% end %}" parses "{% begin %}%x[ %s ]{% end %}" - parses "call \"foo\"" parses "call \"foo\"" - parses "def foo(n); foo(n -1); end" parses "def foo(n); foo(n -1); end" - parses "begin; 1; rescue ex : Foo | Bar; 2; end" parses "begin; 1; rescue ex : Foo | Bar; 2; end" - parses "def &+(); end" parses "def &+(); end" - parses "class Foo(*T); end" parses "class Foo(*T); end" - parses "def foo(x, *args, y = 2, w, z = 3); 1; end" parses "def foo(x, *args, y = 2, w, z = 3); 1; end" - says syntax error on "class Foo(T U)" says syntax error on "class Foo(T U)" - parses "property rescue : Int32" parses "property rescue : Int32" - parses "[1] /2" parses "[1] /2" - says syntax error on "def foo(case); end" says syntax error on "def foo(case); end" - parses "foo % i()" parses "foo % i()" - parses "def self.>=; end;" parses "def self.>=; end;" - says syntax error on "lib Foo; union Bar%()" says syntax error on "lib Foo; union Bar%()" - parses "foo **bar" parses "foo **bar" - says syntax error on "break > 1" says syntax error on "break > 1" - parses "{{ foo.nil? }}" parses "{{ foo.nil? }}" - parses "def foo(x) : Int32\n1\nend" parses "def foo(x) : Int32\n1\nend" - parses "foo { a = 1 }; a" parses "foo { a = 1 }; a" - parses "foo.[0]" parses "foo.[0]" - sets correct locations of keywords of exception handler sets correct locations of keywords of exception handler - says syntax error on "def foo(x x); 1; end" says syntax error on "def foo(x x); 1; end" - parses "1 > 2" parses "1 > 2" - says syntax error on "foo { |(fun)| }" says syntax error on "foo { |(fun)| }" - parses "puts _" parses "puts _" - parses "foo(a: n + 2)" parses "foo(a: n + 2)" - says syntax error on "return do\nend" says syntax error on "return do\nend" - parses "foo.== do end" parses "foo.== do end" - says syntax error on "a, b, *c, d = 1, 2" says syntax error on "a, b, *c, d = 1, 2" - says syntax error on "next == 1" says syntax error on "next == 1" - says syntax error on "struct Foo%x()" says syntax error on "struct Foo%x()" - says syntax error on "fun foo(x : Int32, x : Int64); end" says syntax error on "fun foo(x : Int32, x : Int64); end" - parses "foo = 1; ->foo.&**(Int32)" parses "foo = 1; ->foo.&**(Int32)" - parses "n &+ 2" parses "n &+ 2" - says syntax error on "def foo(private); end" says syntax error on "def foo(private); end" - says syntax error on "foo(a: 1\n,b: 2)" says syntax error on "foo(a: 1\n,b: 2)" - says syntax error on "case 1\nin _;" says syntax error on "case 1\nin _;" - parses "{%\na = 1\n%}" parses "{%\na = 1\n%}" - says syntax error on "return[0]" says syntax error on "return[0]" - parses "def self./; end;" parses "def self./; end;" - parses "<<-FOO\n\t 1\n\t FOO" parses "<<-FOO\n\t 1\n\t FOO" - parses "x([] of Foo, Bar.new)" parses "x([] of Foo, Bar.new)" - parses "while true; end\nif true; end" parses "while true; end\nif true; end" - parses "foo(0, n % 2)" parses "foo(0, n % 2)" - parses "1 .. 2" parses "1 .. 2" - parses "a = 1; a %= 1" parses "a = 1; a %= 1" - says syntax error on "foo { |(extend)| }" says syntax error on "foo { |(extend)| }" - parses "@@a, b = 1, 2" parses "@@a, b = 1, 2" - parses "foo%q" parses "foo%q" - parses "1.tap do |x|; 1; rescue; x; end" parses "1.tap do |x|; 1; rescue; x; end" - sets correct location of parameter in proc literal sets correct location of parameter in proc literal - parses "lib LibFoo\nend\nif true\nend" parses "lib LibFoo\nend\nif true\nend" - parses "in : Int32" parses "in : Int32" - says syntax error on "module Foo->{}" says syntax error on "module Foo->{}" - says syntax error on "case x; when true; 2; when true; end" says syntax error on "case x; when true; 2; when true; end" - parses "class : Int32" parses "class : Int32" - parses "macro foo\n <<-FOO\n %foo\n FOO\nend" parses "macro foo\n <<-FOO\n %foo\n FOO\nend" - says syntax error on "foo { |(case)| }" says syntax error on "foo { |(case)| }" - parses "a()/3" parses "a()/3" - parses "->Foo.foo?" parses "->Foo.foo?" - parses "module Foo :bar end" parses "module Foo :bar end" - parses "foo.bar= *baz" parses "foo.bar= *baz" - says syntax error on "class Foo < Bar->(x : Qux){}" says syntax error on "class Foo < Bar->(x : Qux){}" - says syntax error on "def foo x y; end" says syntax error on "def foo x y; end" - says syntax error on "foo **bar, *x" says syntax error on "foo **bar, *x" - parses "a ? 1\n : b ? 2\n : c ? 3\n : 0" parses "a ? 1\n : b ? 2\n : c ? 3\n : 0" - parses "def foo(@@yield); end" parses "def foo(@@yield); end" - parses "Foo(\nT\n)" parses "Foo(\nT\n)" - says syntax error on "lib Foo; fun foo(x : Int32, x : Int64); end" says syntax error on "lib Foo; fun foo(x : Int32, x : Int64); end" - says syntax error on "def f end" says syntax error on "def f end" - sets correct location of splat in multiple assignment sets correct location of splat in multiple assignment - says syntax error on "def foo(foo abstract); end" says syntax error on "def foo(foo abstract); end" - says syntax error on "%i{{one}" says syntax error on "%i{{one}" - parses "def foo(@nil); end" parses "def foo(@nil); end" - parses "/(fo\#{\"bar\"}\#{1}o)/" parses "/(fo\#{\"bar\"}\#{1}o)/" - says syntax error on "def foo(x, **x); end" says syntax error on "def foo(x, **x); end" - parses "alias Foo::Bar = Baz" parses "alias Foo::Bar = Baz" - parses "foo = 1; ->foo.&-(Int32)" parses "foo = 1; ->foo.&-(Int32)" - parses "/ /" parses "/ /" - parses "1 >= 2" parses "1 >= 2" - parses "foo.> 1, 2" parses "foo.> 1, 2" - parses "a[], a[] = 1, 2" parses "a[], a[] = 1, 2" - says syntax error on "def foo; A = 1; end" says syntax error on "def foo; A = 1; end" - parses "foo(bar:\"a\", baz:\"b\")" parses "foo(bar:\"a\", baz:\"b\")" - says syntax error on "def foo 1; end" says syntax error on "def foo 1; end" - says syntax error on "def foo(def); end" says syntax error on "def foo(def); end" - parses "a = 1; class Foo; @x = a; end" parses "a = 1; class Foo; @x = a; end" - parses "foo(&.@bar.baz)" parses "foo(&.@bar.baz)" - parses "if foo\n1\nelse\n2\nend" parses "if foo\n1\nelse\n2\nend" - parses "def foo(@@pointerof); end" parses "def foo(@@pointerof); end" - parses "def downto(n)\n1\nend" parses "def downto(n)\n1\nend" - parses "%i{foo\\nbar baz}" parses "%i{foo\\nbar baz}" - parses "Foo({String, ->, ->})" parses "Foo({String, ->, ->})" - parses "x = 1 ensure 2" parses "x = 1 ensure 2" - parses "foo(n >> 2)" parses "foo(n >> 2)" - parses "def self.<=(); end;" parses "def self.<=(); end;" - parses "1 -2.0" parses "1 -2.0" - says syntax error on "foo &.[]? 0 =(1)" says syntax error on "foo &.[]? 0 =(1)" - parses "{% begin %}%| %s |{% end %}" parses "{% begin %}%| %s |{% end %}" - says syntax error on "enum Foo\"a\"" says syntax error on "enum Foo\"a\"" - parses "foo.>(1, 2) { 3 }" parses "foo.>(1, 2) { 3 }" - says syntax error on "case x; when /x/; 2; when /x/; end" says syntax error on "case x; when /x/; 2; when /x/; end" - says syntax error on "1 then" says syntax error on "1 then" - parses "a = 1; a &&= 1" parses "a = 1; a &&= 1" - says syntax error on "while 1 == 1 a; end" says syntax error on "while 1 == 1 a; end" - says syntax error on "module Foo:Qux" says syntax error on "module Foo:Qux" - parses ":\"\\u{61}\"" parses ":\"\\u{61}\"" - parses "def foo; yield; end" parses "def foo; yield; end" - parses "def foo(protected foo); end" parses "def foo(protected foo); end" - parses "lib LibC\nalias Foo = Bar\nend" parses "lib LibC\nalias Foo = Bar\nend" - parses "property fun : Int32" parses "property fun : Int32" - parses "a.b ^=\n1" parses "a.b ^=\n1" - parses "foo(z: 0, a: n - 2)" parses "foo(z: 0, a: n - 2)" - parses "->Foo::Bar::Baz.foo" parses "->Foo::Bar::Baz.foo" - says syntax error on "lib Foo; union Bar {|a|a}" says syntax error on "lib Foo; union Bar {|a|a}" - says syntax error on "a {} += 1" says syntax error on "a {} += 1" - parses "begin; 1; rescue; 2; else; 3; end" parses "begin; 1; rescue; 2; else; 3; end" - says syntax error on "def foo(*args = 1); end" says syntax error on "def foo(*args = 1); end" - says syntax error on "foo { |lib| }" says syntax error on "foo { |lib| }" - parses "1 +2_i64" parses "1 +2_i64" - parses "a = 1; a **= 1" parses "a = 1; a **= 1" - says syntax error on "lib Foo; struct Bar[1]" says syntax error on "lib Foo; struct Bar[1]" - parses "<<-SOME\n Sa\n Se\n SOME" parses "<<-SOME\n Sa\n Se\n SOME" - parses "foo.|" parses "foo.|" - parses "foo(a: 1\n)" parses "foo(a: 1\n)" - parses "foo(x) do\n//\nend" parses "foo(x) do\n//\nend" - says syntax error on "foo { |(include)| }" says syntax error on "foo { |(include)| }" - parses "enum Foo; A = 1; B; end" parses "enum Foo; A = 1; B; end" - parses "macro foo(x, *y);end" parses "macro foo(x, *y);end" - parses "def self.!=; end;" parses "def self.!=; end;" - parses "lib LibC\nfun getchar(a : Int)\nend" parses "lib LibC\nfun getchar(a : Int)\nend" - parses "b.c &&= 1" parses "b.c &&= 1" - parses "->::Foo.foo?" parses "->::Foo.foo?" - parses "include Foo" parses "include Foo" - says syntax error on "foo { |false| }" says syntax error on "foo { |false| }" - parses "def foo(x @@alias); end" parses "def foo(x @@alias); end" - sets correct location of protected macro in enum sets correct location of protected macro in enum - parses "foo.+" parses "foo.+" - says syntax error on "foo { |self| }" says syntax error on "foo { |self| }" - parses "foo(z: 0, a: n << 2)" parses "foo(z: 0, a: n << 2)" - parses "foo(1, a: 1, b: 2)" parses "foo(1, a: 1, b: 2)" - parses "foo x do\n//\nend" parses "foo x do\n//\nend" - parses "puts %w(one two)" parses "puts %w(one two)" - parses "abstract class Foo; end" parses "abstract class Foo; end" - says syntax error on "foo(\"\": 1)" says syntax error on "foo(\"\": 1)" - parses "asm(\"nop\" ::: :)" parses "asm(\"nop\" ::: :)" - parses "a b() {}" parses "a b() {}" - parses "a = 1; a ||= 1" parses "a = 1; a ||= 1" - parses "<<-HERE\n \#{1} \#{2}\n HERE" parses "<<-HERE\n \#{1} \#{2}\n HERE" - parses "def /; end;" parses "def /; end;" - says syntax error on "def foo(protected); end" says syntax error on "def foo(protected); end" - says syntax error on "if break; end" says syntax error on "if break; end" - says syntax error on "def foo(**args = 1); end" says syntax error on "def foo(**args = 1); end" - parses "next {1 => 2}" parses "next {1 => 2}" - parses "def foo(x)\n x\nend; foo = 1; b = 2; foo +b" parses "def foo(x)\n x\nend; foo = 1; b = 2; foo +b" - parses "return" parses "return" - says syntax error on "annotation Foo%x()" says syntax error on "annotation Foo%x()" - parses "foo { |a, b, | 1 }" parses "foo { |a, b, | 1 }" - parses "-> do; 1; rescue; 2; end" parses "-> do; 1; rescue; 2; end" - says syntax error on "annotation Foo {|a|a}" says syntax error on "annotation Foo {|a|a}" - parses "def <<(); end" parses "def <<(); end" - parses "puts {{\n1\n}}" parses "puts {{\n1\n}}" - says syntax error on "Foo{one: :two, three: :four}" says syntax error on "Foo{one: :two, three: :four}" - parses "*a, b = 1" parses "*a, b = 1" - parses "foo(0, n & 2)" parses "foo(0, n & 2)" - says syntax error on "*a, *b = 1" says syntax error on "*a, *b = 1" - parses "macro foo;bar{% begin %}body{% end %}baz;end" parses "macro foo;bar{% begin %}body{% end %}baz;end" - says syntax error on "def foo(foo module); end" says syntax error on "def foo(foo module); end" - says syntax error on "foo { |out| }" says syntax error on "foo { |out| }" - says syntax error on "{% unless 1 %} 2 {% elsif 3 %} 3 {% end %}" says syntax error on "{% unless 1 %} 2 {% elsif 3 %} 3 {% end %}" - says syntax error on "unless break; end" says syntax error on "unless break; end" - parses "def foo(@@fun); end" parses "def foo(@@fun); end" - says syntax error on "case 1\nwhen Int32; 2; in 2" says syntax error on "case 1\nwhen Int32; 2; in 2" - parses "foo = 1; ->foo.foo=" parses "foo = 1; ->foo.foo=" - parses "{% unless 1; 2; else 3; end %}" parses "{% unless 1; 2; else 3; end %}" - parses "macro foo(a, @[Foo] &block);end" parses "macro foo(a, @[Foo] &block);end" - says syntax error on "return false foo" says syntax error on "return false foo" - parses "foo..2" parses "foo..2" - parses "macro foo(@[Foo] var);end" parses "macro foo(@[Foo] var);end" - parses "a; unless / /; / /; else; / /; end" parses "a; unless / /; / /; else; / /; end" - parses "foo = 1; ->foo.*(Int32)" parses "foo = 1; ->foo.*(Int32)" - parses "a ?\n b ? b1 : b2\n : c ? 3\n : 0" parses "a ?\n b ? b1 : b2\n : c ? 3\n : 0" - parses "1.foo do; 1; end" parses "1.foo do; 1; end" - parses "{% begin %}%r[\\A]{% end %}" parses "{% begin %}%r[\\A]{% end %}" - parses "macro foo; 1 + 2 {{foo}}\\ 3 + 4; end" parses "macro foo; 1 + 2 {{foo}}\\ 3 + 4; end" - parses "1.[]?(2)" parses "1.[]?(2)" - parses "case / /; when / /; / /; else; / /; end" parses "case / /; when / /; / /; else; / /; end" - parses "<<-HERE\n foo\#{1}bar\n baz\n HERE" parses "<<-HERE\n foo\#{1}bar\n baz\n HERE" - says syntax error on "foo { |unless| }" says syntax error on "foo { |unless| }" - says syntax error on "foo(**bar, out x)" says syntax error on "foo(**bar, out x)" - says syntax error on "def foo(x : {Int32, (Int32, Int32)}); end" says syntax error on "def foo(x : {Int32, (Int32, Int32)}); end" - parses "case : Int32" parses "case : Int32" - says syntax error on "Set {1, 2, 3} of Int32" says syntax error on "Set {1, 2, 3} of Int32" - parses "1.nil?(\n)" parses "1.nil?(\n)" - says syntax error on "lib Foo; struct Bar->(x : Qux){}" says syntax error on "lib Foo; struct Bar->(x : Qux){}" - parses "macro foo\n{%\nif 1\n2\nelse\n3\nend\n%}end" parses "macro foo\n{%\nif 1\n2\nelse\n3\nend\n%}end" - parses "def foo(@@private); end" parses "def foo(@@private); end" - parses "def foo(nil foo); end" parses "def foo(nil foo); end" - parses "<<-'EOF'.x\n foo\nEOF" parses "<<-'EOF'.x\n foo\nEOF" - says syntax error on "foo { |enum| }" says syntax error on "foo { |enum| }" - parses "case\nend" parses "case\nend" - parses "def foo(x @nil); end" parses "def foo(x @nil); end" - says syntax error on "def foo(enum); end" says syntax error on "def foo(enum); end" - parses "def foo(@with); end" parses "def foo(@with); end" - parses "def foo(x @@in); end" parses "def foo(x @@in); end" - parses "foo.is_a? Const" parses "foo.is_a? Const" - parses "macro foo(bar? foo); end" parses "macro foo(bar? foo); end" - parses "class Foo\nend" parses "class Foo\nend" - `class`, `module`, `def`, etc. inside a `def` - says syntax error on "def foo\ndef\nend" says syntax error on "def foo\ndef\nend" - says syntax error on "def foo\nfun\nend" says syntax error on "def foo\nfun\nend" - says syntax error on "def foo\nstruct\nend" says syntax error on "def foo\nstruct\nend" - says syntax error on "def foo\nlib\nend" says syntax error on "def foo\nlib\nend" - says syntax error on "def foo\nalias\nend" says syntax error on "def foo\nalias\nend" - says syntax error on "def foo\nextend\nend" says syntax error on "def foo\nextend\nend" - says syntax error on "def foo\nmodule\nend" says syntax error on "def foo\nmodule\nend" - says syntax error on "def foo\ninclude\nend" says syntax error on "def foo\ninclude\nend" - says syntax error on "def foo\nmacro\nend" says syntax error on "def foo\nmacro\nend" - says syntax error on "def foo\nabstract\nend" says syntax error on "def foo\nabstract\nend" - says syntax error on "def foo\nclass\nend" says syntax error on "def foo\nclass\nend" - says syntax error on "lib Foo; struct Bar%w()" says syntax error on "lib Foo; struct Bar%w()" - says syntax error on "foo { |alias| }" says syntax error on "foo { |alias| }" - parses "def =~; end;" parses "def =~; end;" - parses "{% begin %}%r|\\A|{% end %}" parses "{% begin %}%r|\\A|{% end %}" - says syntax error on "%r(" says syntax error on "%r(" - parses "def foo(x @next); end" parses "def foo(x @next); end" - parses "foo(z: 0, a: n < 2)" parses "foo(z: 0, a: n < 2)" - parses "def foo(x @protected); end" parses "def foo(x @protected); end" - parses "[] of {String, ->}" parses "[] of {String, ->}" - parses "def foo(@@enum); end" parses "def foo(@@enum); end" - parses "foo(z: 0, a: n | 2)" parses "foo(z: 0, a: n | 2)" - parses "puts ~1" parses "puts ~1" - parses "def foo\n1\nend" parses "def foo\n1\nend" - parses "def foo(x @sizeof); end" parses "def foo(x @sizeof); end" - says syntax error on "enum Foo < UInt16; end" says syntax error on "enum Foo < UInt16; end" - sets correct location of element in array literal sets correct location of element in array literal - parses "1 rescue 2" parses "1 rescue 2" - parses "{% begin %}%i( %s ){% end %}" parses "{% begin %}%i( %s ){% end %}" - sets correct location of MacroIf within another node sets correct location of MacroIf within another node - parses "def foo(pointerof foo); end" parses "def foo(pointerof foo); end" - parses "def %(); end" parses "def %(); end" - parses "/foo/" parses "/foo/" - says syntax error on "foo { |abstract| }" says syntax error on "foo { |abstract| }" - parses "end : Int32" parses "end : Int32" - parses "foo(n &** 2)" parses "foo(n &** 2)" - parses "def foo(@@next); end" parses "def foo(@@next); end" - parses "{% a = 1 if 2 %}" parses "{% a = 1 if 2 %}" - says syntax error on "next < 1" says syntax error on "next < 1" - parses "\n class Foo\n def bar\n print as Foo\n end\n end\n " parses "\n class Foo\n def bar\n print as Foo\n end\n end\n " - says syntax error on "{a: 1, \"\": 2}" says syntax error on "{a: 1, \"\": 2}" - parses ":<=>" parses ":<=>" - parses "/\\ /" parses "/\\ /" - says syntax error on "def foo:String\nend" says syntax error on "def foo:String\nend" - parses "n * 2" parses "n * 2" - parses "a.b |=\n1" parses "a.b |=\n1" - says syntax error on "def foo(\"bar\");end" says syntax error on "def foo(\"bar\");end" - parses "def foo(if foo); end" parses "def foo(if foo); end" - says syntax error on "enum Foo->{}" says syntax error on "enum Foo->{}" - parses "foo(n // 2)" parses "foo(n // 2)" - parses "x = 1; foo x { }" parses "x = 1; foo x { }" - parses "as(Bar)" parses "as(Bar)" - parses "foo.===(1, 2) { 3 }" parses "foo.===(1, 2) { 3 }" - parses "def foo(x @@true); end" parses "def foo(x @@true); end" - parses "case foo; end" parses "case foo; end" - parses "(baz; bar do\nend)" parses "(baz; bar do\nend)" - parses "return 1, 2" parses "return 1, 2" - says syntax error on "<<-'HEREDOC'" says syntax error on "<<-'HEREDOC'" - parses "def foo(a, &block : Int, Float -> Double); end" parses "def foo(a, &block : Int, Float -> Double); end" - parses "foo.>= 1, 2" parses "foo.>= 1, 2" - parses "def foo(x @@fun); end" parses "def foo(x @@fun); end" - says syntax error on "next ? 1 : 2" says syntax error on "next ? 1 : 2" - parses "def foo(@@nil); end" parses "def foo(@@nil); end" - parses "def foo(require foo); end" parses "def foo(require foo); end" - parses "def self.!=(); end;" parses "def self.!=(); end;" - parses "Foo(*T)" parses "Foo(*T)" - parses "property if : Int32" parses "property if : Int32" - parses "def foo(x @@pointerof); end" parses "def foo(x @@pointerof); end" - parses ":foo" parses ":foo" - parses "a[0], a[1] = 1, 2" parses "a[0], a[1] = 1, 2" - parses "<<-HERE\n \#{1} \\n \#{2}\n HERE" parses "<<-HERE\n \#{1} \\n \#{2}\n HERE" - sets correct location for multiple nodes within another node sets correct location for multiple nodes within another node - parses "1_u128" parses "1_u128" - says syntax error on "asm(\"\" : 1)" says syntax error on "asm(\"\" : 1)" - says syntax error on "x, self = 1, 2" says syntax error on "x, self = 1, 2" - says syntax error on "def foo(foo with); end" says syntax error on "def foo(foo with); end" - says syntax error on "annotation Foo'a'" says syntax error on "annotation Foo'a'" - parses "def foo(x @@yield); end" parses "def foo(x @@yield); end" - parses "def self.!~(); end;" parses "def self.!~(); end;" - parses "lib LibC; struct Foo; {% if 1 %}2{% end %}; end; end" parses "lib LibC; struct Foo; {% if 1 %}2{% end %}; end; end" - parses "->Foo.>(Int32)" parses "->Foo.>(Int32)" - says syntax error on "break ** 1" says syntax error on "break ** 1" - parses "->\n:\nInt32\n{\n}" parses "->\n:\nInt32\n{\n}" - parses "->Foo.==(Int32)" parses "->Foo.==(Int32)" - parses "1 + /foo/" parses "1 + /foo/" - parses "begin\n1\nensure\n2\nend" parses "begin\n1\nensure\n2\nend" - parses "foo.|(1, 2)" parses "foo.|(1, 2)" - parses "def foo(x, *args, y = 2); 1; end" parses "def foo(x, *args, y = 2); 1; end" - says syntax error on "lib Foo; enum Bar {|a|a}" says syntax error on "lib Foo; enum Bar {|a|a}" - parses "yield;" parses "yield;" - parses "n >> 2" parses "n >> 2" - parses "1 / -2" parses "1 / -2" - parses "1.!(\n)" parses "1.!(\n)" - parses "def foo(x @@self); end" parses "def foo(x @@self); end" - parses "-> : Int32 { }" parses "-> : Int32 { }" - parses "def []; end" parses "def []; end" - parses "a = 1; a ensure a" parses "a = 1; a ensure a" - says syntax error on "$foo :: Foo" says syntax error on "$foo :: Foo" - parses "def foo(var : self*); end" parses "def foo(var : self*); end" - parses ":+" parses ":+" - parses "def foo(@@asm); end" parses "def foo(@@asm); end" - parses "next 1 if true" parses "next 1 if true" - says syntax error on "module Foo%()" says syntax error on "module Foo%()" - parses "def foo(with foo); end" parses "def foo(with foo); end" - parses "foo.%(1, 2)" parses "foo.%(1, 2)" - parses "def foo(@var); end" parses "def foo(@var); end" - says syntax error on "def foo(**args, x); end" says syntax error on "def foo(**args, x); end" - says syntax error on "until return; end" says syntax error on "until return; end" - parses "A.new(\"x\", B.new(\"y\"))" parses "A.new(\"x\", B.new(\"y\"))" - parses "foo.== 1, 2" parses "foo.== 1, 2" - says syntax error on "class Foo\"a\"" says syntax error on "class Foo\"a\"" - parses "foo begin\nbar do\nend\nend" parses "foo begin\nbar do\nend\nend" - says syntax error on "<<-HERE\n One\nwrong\n Zero\n HERE" says syntax error on "<<-HERE\n One\nwrong\n Zero\n HERE" - sets correct locations of macro if / else / elsif sets correct locations of macro if / else / elsif - parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) ::)" parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) ::)" - parses "def foo(@module); end" parses "def foo(@module); end" - parses "next 1, *2" parses "next 1, *2" - parses "macro foo;bar{% for x in y %}\\ \n body{% end %}\\ baz;end" parses "macro foo;bar{% for x in y %}\\ \n body{% end %}\\ baz;end" - says syntax error on "def foo(foo include); end" says syntax error on "def foo(foo include); end" - says syntax error on "unless return; end" says syntax error on "unless return; end" - parses "def **(); end;" parses "def **(); end;" - says syntax error on "case 1\nin Int32; 2; else" says syntax error on "case 1\nin Int32; 2; else" - parses "Int[8]" parses "Int[8]" - parses "def self.**; end;" parses "def self.**; end;" - parses "def self.[]?; end" parses "def self.[]?; end" - parses "foo %x" parses "foo %x" - parses "foo(//)" parses "foo(//)" - parses "def foo(false foo); end" parses "def foo(false foo); end" - parses "Foo({x: X, y: Y})" parses "Foo({x: X, y: Y})" - says syntax error on "foo { |(x, x)| }" says syntax error on "foo { |(x, x)| }" - says syntax error on "foo { |(false)| }" says syntax error on "foo { |(false)| }" - parses "def foo(var : Int, Float -> Double); end" parses "def foo(var : Int, Float -> Double); end" - says syntax error on "unless 1 == 1 a; end" says syntax error on "unless 1 == 1 a; end" - parses "foo do; 1; end" parses "foo do; 1; end" - parses "foo(0, n !~ 2)" parses "foo(0, n !~ 2)" - says syntax error on "FOO, BAR = 1, 2" says syntax error on "FOO, BAR = 1, 2" - parses "foo /a/" parses "foo /a/" - parses "foo(0, n &* 2)" parses "foo(0, n &* 2)" - says syntax error on "b, 1 == 2, a = 4" says syntax error on "b, 1 == 2, a = 4" - says syntax error on "a, b, c, d, *e = 1, 2, 3" says syntax error on "a, b, c, d, *e = 1, 2, 3" - says syntax error on "lib Foo; union Bar%w()" says syntax error on "lib Foo; union Bar%w()" - parses "return;" parses "return;" - parses "def foo(\nvar); end" parses "def foo(\nvar); end" - parses "def foo; x { |a| a }; end" parses "def foo; x { |a| a }; end" - parses "foo &.[0] = 1" parses "foo &.[0] = 1" - parses "foo(z: 0, a: n >> 2)" parses "foo(z: 0, a: n >> 2)" - parses "->Foo.**(Int32)" parses "->Foo.**(Int32)" - parses "1.tap do; 1; rescue; 2; end" parses "1.tap do; 1; rescue; 2; end" - parses "{% begin %}%Q< %s >{% end %}" parses "{% begin %}%Q< %s >{% end %}" - parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) : \"eax\", \"ebx\" : \"volatile\", \"alignstack\", \"intel\")" parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) : \"eax\", \"ebx\" : \"volatile\", \"alignstack\", \"intel\")" - parses " macro foo(\n @[Foo]\n id,\n @[Bar] name\n );end" parses " macro foo(\n @[Foo]\n id,\n @[Bar] name\n );end" - parses "1 &- 2" parses "1 &- 2" - parses "foo(a: n / 2)" parses "foo(a: n / 2)" - parses "foo(x, *bar, *baz, y)" parses "foo(x, *bar, *baz, y)" - says syntax error on "class Foo'a'" says syntax error on "class Foo'a'" - parses "def foo(a); a; end" parses "def foo(a); a; end" - parses "def <=(); end;" parses "def <=(); end;" - says syntax error on "enum Foo : Int32%x()" says syntax error on "enum Foo : Int32%x()" - says syntax error on "enum Foo : Int32:qux" says syntax error on "enum Foo : Int32:qux" - says syntax error on "foo { |x, x| }" says syntax error on "foo { |x, x| }" - parses "case 1\nin false; 2; end" parses "case 1\nin false; 2; end" - parses "macro [];end" parses "macro [];end" - parses "macro foo(x); 1 + 2; end" parses "macro foo(x); 1 + 2; end" - parses "Foo({\"foo\": X, \"bar\": Y})" parses "Foo({\"foo\": X, \"bar\": Y})" - parses "foo &.[]" parses "foo &.[]" - parses "def foo(x = __LINE__); end" parses "def foo(x = __LINE__); end" - says syntax error on "foo &.bar.[](0)=(1)" says syntax error on "foo &.bar.[](0)=(1)" - says syntax error on "lib Foo'a'" says syntax error on "lib Foo'a'" - parses "lib LibC; fun foo(a : Int*); end" parses "lib LibC; fun foo(a : Int*); end" - sets correct location of call name sets correct location of call name - parses "foo \"foo bar\": 1, \"baz\": 2" parses "foo \"foo bar\": 1, \"baz\": 2" - parses "def type(type); end" parses "def type(type); end" - says syntax error on "break == 1" says syntax error on "break == 1" - parses "x = 1; foo x do\nend" parses "x = 1; foo x do\nend" - says syntax error on "def foo() :String\nend" says syntax error on "def foo() :String\nend" - parses "Foo(X: U, Y: V)" parses "Foo(X: U, Y: V)" - says syntax error on "break / 1" says syntax error on "break / 1" - parses ":[]?" parses ":[]?" - says syntax error on "case x; when 1; 2; when 1; end" says syntax error on "case x; when 1; 2; when 1; end" - parses "def foo(break foo); end" parses "def foo(break foo); end" - parses "1 =~ 2" parses "1 =~ 2" - says syntax warning on "foo do |(bar!)|\nend" says syntax warning on "foo do |(bar!)|\nend" - parses "@a : Foo = 1" parses "@a : Foo = 1" - sets location of top-level fun name sets location of top-level fun name - says syntax error on "case x; when X; 2; when X; end" says syntax error on "case x; when X; 2; when X; end" - parses "asm(\"nop\" ::)" parses "asm(\"nop\" ::)" - parses "asm(\"nop\" : \"a\"(0))" parses "asm(\"nop\" : \"a\"(0))" - sets args_in_brackets to false for `a.b` sets args_in_brackets to false for `a.b` - parses "def foo(x @@while); end" parses "def foo(x @@while); end" - parses "rescue : Int32" parses "rescue : Int32" - says syntax error on "module Foo'a'" says syntax error on "module Foo'a'" - parses "lib LibC; union Foo; end end" parses "lib LibC; union Foo; end end" - parses "macro foo(bar! foo); end" parses "macro foo(bar! foo); end" - parses "property select : Int32" parses "property select : Int32" - parses "-1.0" parses "-1.0" - parses "x.y=(1).to_s" parses "x.y=(1).to_s" - says syntax error on "enum Foo->(x : Qux){}" says syntax error on "enum Foo->(x : Qux){}" - parses "->foo!" parses "->foo!" - says syntax error on "struct Foo%()" says syntax error on "struct Foo%()" - parses "&+ 1" parses "&+ 1" - says syntax error on "def foo(x : (Int32, Int32)); end" says syntax error on "def foo(x : (Int32, Int32)); end" - says syntax error on "module Foo[1]" says syntax error on "module Foo[1]" - parses "def foo(@@extend); end" parses "def foo(@@extend); end" - parses "unless : Int32" parses "unless : Int32" - parses "def foo(@@unless); end" parses "def foo(@@unless); end" - parses "case 1\nin true; 2; end" parses "case 1\nin true; 2; end" - parses "->(x) { x }" parses "->(x) { x }" - says syntax error on "struct Foo[1]" says syntax error on "struct Foo[1]" - says syntax error on "case x; when [1, 2]; 2; when [1, 2]; end" says syntax error on "case x; when [1, 2]; 2; when [1, 2]; end" - parses "with : Int32" parses "with : Int32" - parses "def **(); end" parses "def **(); end" - parses "1 & 2" parses "1 & 2" - says syntax error on "def foo(*a foo); end" says syntax error on "def foo(*a foo); end" - parses "next 1, 2" parses "next 1, 2" - parses "def foo(var : Int**); end" parses "def foo(var : Int**); end" - says syntax error on "offsetof(X, 1.0)" says syntax error on "offsetof(X, 1.0)" - says syntax error on "class Foo(); end" says syntax error on "class Foo(); end" - says syntax error on "return ? 1 : 2" says syntax error on "return ? 1 : 2" - parses "def foo(x @@sizeof); end" parses "def foo(x @@sizeof); end" - parses "a = b = 2" parses "a = b = 2" - parses "def foo(x @self); end" parses "def foo(x @self); end" - parses "a() /3" parses "a() /3" - parses "n <= 2" parses "n <= 2" - says syntax error on "{foo: 1, bar: 2\nbaz: 3}" says syntax error on "{foo: 1, bar: 2\nbaz: 3}" - parses "macro foo;bar{% unless x %}body{% end %}baz;end" parses "macro foo;bar{% unless x %}body{% end %}baz;end" - says syntax error on "foo :: Foo" says syntax error on "foo :: Foo" - parses "{1 =>\n2, 3 =>\n4}" parses "{1 =>\n2, 3 =>\n4}" - says syntax error on "def foo(foo yield); end" says syntax error on "def foo(foo yield); end" - parses "1 | 2" parses "1 | 2" - parses "def foo(@macro); end" parses "def foo(@macro); end" - parses "{% begin %}%x< %s >{% end %}" parses "{% begin %}%x< %s >{% end %}" - parses "if foo; 1; end" parses "if foo; 1; end" - parses "def foo(module foo); end" parses "def foo(module foo); end" - parses "def foo(@extend); end" parses "def foo(@extend); end" - parses "{[] of Foo, Bar::Baz.new}" parses "{[] of Foo, Bar::Baz.new}" - says syntax error on "def foo(x :Int32); end" says syntax error on "def foo(x :Int32); end" - parses "def foo(var : Char[N]); end" parses "def foo(var : Char[N]); end" - says syntax error on "foo(next)" says syntax error on "foo(next)" - parses "foo.- do end" parses "foo.- do end" - parses "a.b / 2" parses "a.b / 2" - parses "<<-HERE\n One \\n Two\n Zero\n HERE" parses "<<-HERE\n One \\n Two\n Zero\n HERE" - parses "foo(Bar { 1 })" parses "foo(Bar { 1 })" - parses "foo\n.bar" parses "foo\n.bar" - says syntax error on "return > 1" says syntax error on "return > 1" - parses "a.foo &block" parses "a.foo &block" - parses "property with : Int32" parses "property with : Int32" - parses "a.foo(&block)" parses "a.foo(&block)" - parses "foo.|(1, 2) { 3 }" parses "foo.|(1, 2) { 3 }" - parses "module Foo\ndef foo; end; end" parses "module Foo\ndef foo; end; end" - parses "def foo(x @@if); end" parses "def foo(x @@if); end" - parses "lib LibC\n@[Bar]; end" parses "lib LibC\n@[Bar]; end" - parses "macro foo;%var{1, x} = hello;end" parses "macro foo;%var{1, x} = hello;end" - parses "if : Int32" parses "if : Int32" - parses "foo\n .bar" parses "foo\n .bar" - says syntax error on "break when true" says syntax error on "break when true" - says syntax error on "case 1\nwhen .=(2)" says syntax error on "case 1\nwhen .=(2)" - parses "\"\#{1\n}\"" parses "\"\#{1\n}\"" - parses "1 <= 2" parses "1 <= 2" - says syntax error on "annotation Foo:qux" says syntax error on "annotation Foo:qux" - parses "foo = 1; ->foo.-(Int32)" parses "foo = 1; ->foo.-(Int32)" - parses "!a && b" parses "!a && b" - parses "foo(0, n << 2)" parses "foo(0, n << 2)" - parses "module Foo \"a\" end" parses "module Foo \"a\" end" - parses "puts {{*1}}" parses "puts {{*1}}" - parses "->Foo.===(Int32)" parses "->Foo.===(Int32)" - parses "foo.bar = {} of Int32 => Int32" parses "foo.bar = {} of Int32 => Int32" - parses "(1 ... )" parses "(1 ... )" - says syntax error on "*a" says syntax error on "*a" - parses "as?(Bar)" parses "as?(Bar)" - parses "def foo(@@var); 1; end" parses "def foo(@@var); 1; end" - says syntax error on "struct Foo%w()" says syntax error on "struct Foo%w()" - says syntax error on "foo(\"bar\" \"baz\")" says syntax error on "foo(\"bar\" \"baz\")" - parses "call(foo.as Bar, Baz)" parses "call(foo.as Bar, Baz)" - says syntax error on "foo &.[]?(0)=(1)" says syntax error on "foo &.[]?(0)=(1)" - parses "foo(z: 0, a: n &* 2)" parses "foo(z: 0, a: n &* 2)" - parses "1_i128" parses "1_i128" - parses "1.is_a?(\n Int32\n)" parses "1.is_a?(\n Int32\n)" - parses "->::Foo.foo" parses "->::Foo.foo" - says syntax error on "%w{{one}" says syntax error on "%w{{one}" - parses "foo(&.as?(T))" parses "foo(&.as?(T))" - parses "foo &.block" parses "foo &.block" - says syntax error on "macro foo.bar;end" says syntax error on "macro foo.bar;end" - calls with blocks within index operator (#12818) - parses "foo.[](bar { 1 })" parses "foo.[](bar { 1 })" - parses "foo.[](bar do; 1; end)" parses "foo.[](bar do; 1; end)" - parses "foo[bar do; 1; end]" parses "foo[bar do; 1; end]" - parses "foo[bar { 1 }]" parses "foo[bar { 1 }]" - parses "foo.[bar do; 1; end]" parses "foo.[bar do; 1; end]" - parses "foo.[bar { 1 }]" parses "foo.[bar { 1 }]" - parses "foo(&.block)" parses "foo(&.block)" - parses ":>=" parses ":>=" - parses "def foo(@pointerof); end" parses "def foo(@pointerof); end" - says syntax error on "module Foo{|a|a}" says syntax error on "module Foo{|a|a}" - parses "foo % x()" parses "foo % x()" - parses "T/1" parses "T/1" - sets correct locations of macro if / elsif sets correct locations of macro if / elsif - parses "def foo(alias foo); end" parses "def foo(alias foo); end" - parses "case when 1\n2\nend" parses "case when 1\n2\nend" - says syntax error on "foo { |(protected)| }" says syntax error on "foo { |(protected)| }" - parses "foo%w" parses "foo%w" - parses "def []?; end" parses "def []?; end" - says syntax error on "def foo(**args, **args2); end" says syntax error on "def foo(**args, **args2); end" - sets correct location of annotation on method parameter sets correct location of annotation on method parameter - says syntax error on "return &* 1" says syntax error on "return &* 1" - says syntax error on "class Foo < Bar {|a|a}" says syntax error on "class Foo < Bar {|a|a}" - parses "foo(\"foo bar\": 1, \"baz\": 2)" parses "foo(\"foo bar\": 1, \"baz\": 2)" - says syntax error on "foo { |begin| }" says syntax error on "foo { |begin| }" - parses "def foo(a, &block : Int, self -> Double); end" parses "def foo(a, &block : Int, self -> Double); end" - parses "macro foo(@[Foo] *args);end" parses "macro foo(@[Foo] *args);end" - parses "def foo(until foo); end" parses "def foo(until foo); end" - parses "%w{one\\ two}" parses "%w{one\\ two}" - parses "def !~(); end" parses "def !~(); end" - parses "def foo(lib foo); end" parses "def foo(lib foo); end" - parses ":<<" parses ":<<" - says syntax error on "a.b() += 1" says syntax error on "a.b() += 1" - parses "<<-FOO\n \t1\n \tFOO" parses "<<-FOO\n \t1\n \tFOO" - parses "def foo(x @def); end" parses "def foo(x @def); end" - says syntax error on "def foo(x : (Int32, Int32) | Int32); end" says syntax error on "def foo(x : (Int32, Int32) | Int32); end" - parses "foo(a: n &+ 2)" parses "foo(a: n &+ 2)" - says syntax error on "class Foo < Bar->{}" says syntax error on "class Foo < Bar->{}" - parses "property enum : Int32" parses "property enum : Int32" - parses "foo(a: n < 2)" parses "foo(a: n < 2)" - parses "def foo(x @@until); end" parses "def foo(x @@until); end" - parses "case 1; when 1 then 2; else; 3; end" parses "case 1; when 1 then 2; else; 3; end" - parses "def foo(a, &block : Foo); end" parses "def foo(a, &block : Foo); end" - parses "lib LibC; fun getchar(a : Int, b : Float) : Int; end" parses "lib LibC; fun getchar(a : Int, b : Float) : Int; end" - parses "def foo; yield 1; yield; end" parses "def foo; yield 1; yield; end" - parses "foo(0, n === 2)" parses "foo(0, n === 2)" - parses "if foo.responds_to? :foo\nx = 1\nend" parses "if foo.responds_to? :foo\nx = 1\nend" - parses "a = 1\ncase 1\nwhen a then 1\nend" parses "a = 1\ncase 1\nwhen a then 1\nend" - parses ":[]=" parses ":[]=" - parses "Foo({->})" parses "Foo({->})" - parses "enum Foo; @@foo = 1\n A \n end" parses "enum Foo; @@foo = 1\n A \n end" - parses "(bar do\nend)" parses "(bar do\nend)" - parses "def self.~(); end;" parses "def self.~(); end;" - parses "foo = 1; ->foo.foo!" parses "foo = 1; ->foo.foo!" - says syntax error on "struct Foo:qux" says syntax error on "struct Foo:qux" - parses "foo = 1; ->foo.[](Int32)" parses "foo = 1; ->foo.[](Int32)" - parses "Foo?" parses "Foo?" - parses "foo(0, n >> 2)" parses "foo(0, n >> 2)" - says syntax error on "->() :Int32 { }" says syntax error on "->() :Int32 { }" - says syntax error on "[\n]" says syntax error on "[\n]" - says syntax error on "{a: 1 b: 2}" says syntax error on "{a: 1 b: 2}" - parses "x = 2; foo do bar x end" parses "x = 2; foo do bar x end" - says syntax error on "foo **bar, 1" says syntax error on "foo **bar, 1" - parses "foo(0, n == 2)" parses "foo(0, n == 2)" - parses "foo.^(1, 2)" parses "foo.^(1, 2)" - parses "enum Foo; {{1}}; end" parses "enum Foo; {{1}}; end" - parses "foo.<" parses "foo.<" - parses "r = 1; r.x += 2" parses "r = 1; r.x += 2" - parses ":=~" parses ":=~" - parses "module Foo 'a' end" parses "module Foo 'a' end" - parses "foo.[]= do end" parses "foo.[]= do end" - says syntax error on "enum Foo'a'" says syntax error on "enum Foo'a'" - says syntax error on "->(x y) { }" says syntax error on "->(x y) { }" - says syntax error on "next.foo" says syntax error on "next.foo" - parses "foo(a: n | 2)" parses "foo(a: n | 2)" - says syntax error on "foo { |(class)| }" says syntax error on "foo { |(class)| }" - parses "def foo(\"bar qux\" y); y; end" parses "def foo(\"bar qux\" y); y; end" - says syntax error on "{1\n,2}" says syntax error on "{1\n,2}" - says syntax error on "class Foo {|a|a}" says syntax error on "class Foo {|a|a}" - parses "def !~; end;" parses "def !~; end;" - sets correct location of annotation in enum sets correct location of annotation in enum - parses "{% if x %}body{% end %}" parses "{% if x %}body{% end %}" - parses "a, b, *c = 1, 2" parses "a, b, *c = 1, 2" - says syntax error on "case 1; when return; end; end" says syntax error on "case 1; when return; end; end" - parses "foo(z: 0, a: n =~ 2)" parses "foo(z: 0, a: n =~ 2)" - parses "a = 1\nfoo -a" parses "a = 1\nfoo -a" - parses "foo = 1; ->foo.//(Int32)" parses "foo = 1; ->foo.//(Int32)" - parses "foo.*" parses "foo.*" - says syntax error on "foo &.[](0)=(1)" says syntax error on "foo &.[](0)=(1)" - parses "def foo(x @@nil); end" parses "def foo(x @@nil); end" - parses "-> do end" parses "-> do end" - says syntax error on "def foo(foo require); end" says syntax error on "def foo(foo require); end" - says syntax error on "<<-HERE\n One\n \#{1}\n HERE" says syntax error on "<<-HERE\n One\n \#{1}\n HERE" - parses "def !~(); end;" parses "def !~(); end;" - parses "{% x if 1 %}" parses "{% x if 1 %}" - parses "def foo(class foo); end" parses "def foo(class foo); end" - parses "a = 1; b = 2; c = 3; a-b-c" parses "a = 1; b = 2; c = 3; a-b-c" - parses "1 if /x/" parses "1 if /x/" - says syntax error on "case x; when \"a\"; 2; when \"a\"; end" says syntax error on "case x; when \"a\"; 2; when \"a\"; end" - parses "foo % w()" parses "foo % w()" - parses "macro foo=;end" parses "macro foo=;end" - parses "begin; / /; end" parses "begin; / /; end" - parses "def *; end;" parses "def *; end;" - parses "a.foo, a.bar = 1, 2" parses "a.foo, a.bar = 1, 2" - parses "[] of Int" parses "[] of Int" - parses "macro foo;bar{% if x %}body{% elsif y %}body2{%end%}baz;end" parses "macro foo;bar{% if x %}body{% elsif y %}body2{%end%}baz;end" - says syntax error on "macro foo(x, *); 1; end" says syntax error on "macro foo(x, *); 1; end" - parses "abstract def foo; 1" parses "abstract def foo; 1" - parses "->foo=" parses "->foo=" - parses "a == / /" parses "a == / /" - parses "foo(bar { })" parses "foo(bar { })" - says syntax error on "def foo(**x, &x); end" says syntax error on "def foo(**x, &x); end" - parses "foo(\n &.block\n)" parses "foo(\n &.block\n)" - parses "foo = 1; ->foo.<=(Int32)" parses "foo = 1; ->foo.<=(Int32)" - parses "{%\nif 1; 2; end; 3\n%}" parses "{%\nif 1; 2; end; 3\n%}" - parses "{% if 1; 2; end; %}" parses "{% if 1; 2; end; %}" - says syntax error on "macro foo(x\n,y); 1; end" says syntax error on "macro foo(x\n,y); 1; end" - parses "foo 1, a: 1, b: 2\n1" parses "foo 1, a: 1, b: 2\n1" - says syntax error on "yield return" says syntax error on "yield return" - says syntax error on "{\"\": 1}" says syntax error on "{\"\": 1}" - parses "<<-'HERE'\n hello \\n world\n \#{1}\n HERE" parses "<<-'HERE'\n hello \\n world\n \#{1}\n HERE" - parses "call ->foo" parses "call ->foo" - says syntax error on "return ... 1" says syntax error on "return ... 1" - says syntax error on "struct Foo->(x : Qux){}" says syntax error on "struct Foo->(x : Qux){}" - parses "def foo; a = 1; with a yield a; end" parses "def foo; a = 1; with a yield a; end" - parses "{% begin %}%< %s >{% end %}" parses "{% begin %}%< %s >{% end %}" - parses "::A::B" parses "::A::B" - says syntax error on "def foo(if); end" says syntax error on "def foo(if); end" - parses "def foo(x : U) : Int32 forall T, U; end" parses "def foo(x : U) : Int32 forall T, U; end" - parses "{% begin %}%x( %s ){% end %}" parses "{% begin %}%x( %s ){% end %}" - parses "lib LibC; struct Foo; include Bar; end; end" parses "lib LibC; struct Foo; include Bar; end; end" - parses "foo(0, n ** 2)" parses "foo(0, n ** 2)" - parses "foo rescue 2" parses "foo rescue 2" - parses "extend Foo" parses "extend Foo" - parses "case {1}\nin {false}; 2; end" parses "case {1}\nin {false}; 2; end" - says syntax error on "macro def foo : String; 1; end" says syntax error on "macro def foo : String; 1; end" - parses "foo.<= 1, 2" parses "foo.<= 1, 2" - parses "def foo(@@macro); end" parses "def foo(@@macro); end" - parses "def foo(bar! foo); end" parses "def foo(bar! foo); end" - parses "def foo(x @asm); end" parses "def foo(x @asm); end" - says syntax error on "foo { |def| }" says syntax error on "foo { |def| }" - says syntax error on "return ^ 1" says syntax error on "return ^ 1" - parses "fun foo : Int32; 1; end; 2" parses "fun foo : Int32; 1; end; 2" - says syntax error on "foo { |case| }" says syntax error on "foo { |case| }" - parses "Foo({x: X, typeof: Y})" parses "Foo({x: X, typeof: Y})" - parses "def foo(x); end; x" parses "def foo(x); end; x" - says syntax error on "lib Foo; enum Bar{1}" says syntax error on "lib Foo; enum Bar{1}" - says syntax error on "foo { |offsetof| }" says syntax error on "foo { |offsetof| }" - sets location of obj.x += as call sets location of obj.x += as call - parses "case 1; when 0, 1; 2; else; 3; end" parses "case 1; when 0, 1; 2; else; 3; end" - says syntax warning on "def foo(foo bar!); end" says syntax warning on "def foo(foo bar!); end" - parses "false" parses "false" - parses "def foo(@var = 1); 1; end" parses "def foo(@var = 1); 1; end" - parses "foo(a: n == 2)" parses "foo(a: n == 2)" - says syntax error on "macro foo(x : Int32); end" says syntax error on "macro foo(x : Int32); end" - says syntax error on "foo.[]? = 1" says syntax error on "foo.[]? = 1" - parses "\"\"" parses "\"\"" - parses ":foo?" parses ":foo?" - parses "1 - 2" parses "1 - 2" - parses "foo.!~ do end" parses "foo.!~ do end" - says syntax error on "{1 => 2 3 => 4}" says syntax error on "{1 => 2 3 => 4}" - parses ":!=" parses ":!=" - says syntax error on "until break; end" says syntax error on "until break; end" - parses "instance_sizeof(\n Int32\n)" parses "instance_sizeof(\n Int32\n)" - parses "@@a = uninitialized Foo" parses "@@a = uninitialized Foo" - parses "def foo(x = / /); end" parses "def foo(x = / /); end" - parses "foo &.@bar.baz" parses "foo &.@bar.baz" - gets corrects end location for block with do ... end gets corrects end location for block with do ... end - says syntax error on "foo.responds_to?" says syntax error on "foo.responds_to?" - says syntax error on "def foo=(a,b); end" says syntax error on "def foo=(a,b); end" - parses "def foo(var : Int32 -> = 1); end" parses "def foo(var : Int32 -> = 1); end" - says syntax error on "1 if next" says syntax error on "1 if next" - parses "foo = 1; foo {}" parses "foo = 1; foo {}" - says syntax error on "case 1\nin Int32; 2; when 2" says syntax error on "case 1\nin Int32; 2; when 2" - parses "foo ..2" parses "foo ..2" - says syntax error on "foo { |true| }" says syntax error on "foo { |true| }" - parses "case {1}\nin {true}; 2; end" parses "case {1}\nin {true}; 2; end" - says syntax error on "$foo" says syntax error on "$foo" - parses "def foo(@@class); end" parses "def foo(@@class); end" - parses "x[{1}]" parses "x[{1}]" - says syntax error on "break &+ 1" says syntax error on "break &+ 1" - says syntax error on "break >> 1" says syntax error on "break >> 1" - says syntax error on "*a === 1" says syntax error on "*a === 1" - says syntax error on "foo[next]" says syntax error on "foo[next]" - parses "def foo; end" parses "def foo; end" - says syntax error on "self += 1" says syntax error on "self += 1" - parses "n % 2" parses "n % 2" - parses "asm(\"nop\" : \"a\"(0), \"b\"(1) : \"c\"(2), \"d\"(3))" parses "asm(\"nop\" : \"a\"(0), \"b\"(1) : \"c\"(2), \"d\"(3))" - says syntax error on "\"foo\" \"bar\"" says syntax error on "\"foo\" \"bar\"" - parses "begin; 1; 2; 3; end;" parses "begin; 1; 2; 3; end;" - parses "->Foo.[](Int32)" parses "->Foo.[](Int32)" - says syntax error on "case 1 == 1; when 2 a; end" says syntax error on "case 1 == 1; when 2 a; end" - parses ":%" parses ":%" - parses "def foo;bar(end: 1);end" parses "def foo;bar(end: 1);end" - parses "\u3042.\u3044, \u3046.\u3048.\u304A = 1, 2" parses "\u3042.\u3044, \u3046.\u3048.\u304A = 1, 2" - says syntax error on "module Foo\"a\"" says syntax error on "module Foo\"a\"" - says syntax error on "foo { |end| }" says syntax error on "foo { |end| }" - says syntax error on "1 == 2, a = 4" says syntax error on "1 == 2, a = 4" - parses "case\n1\nwhen 1\n2\nend\nif a\nend" parses "case\n1\nwhen 1\n2\nend\nif a\nend" - parses "foo(a: n - 2)" parses "foo(a: n - 2)" - parses "abstract def foo(x) : Int32" parses "abstract def foo(x) : Int32" - parses "def foo(x @begin); end" parses "def foo(x @begin); end" - parses "1 -2_i64" parses "1 -2_i64" - parses "lib : Int32" parses "lib : Int32" - parses "foo %q()" parses "foo %q()" - parses "1;+2" parses "1;+2" - parses "->foo" parses "->foo" - parses "@foo/2" parses "@foo/2" - says syntax warning on "foo do |foo, bar!|\nend" says syntax warning on "foo do |foo, bar!|\nend" - says syntax error on "@@foo :: Foo" says syntax error on "@@foo :: Foo" - says syntax error on "def foo?=(x); end" says syntax error on "def foo?=(x); end" - parses "{{ nil?(foo) }}" parses "{{ nil?(foo) }}" - parses "@@a : Foo" parses "@@a : Foo" - says syntax error on "class Foo[1]" says syntax error on "class Foo[1]" - parses "foo(n % 2)" parses "foo(n % 2)" - says syntax error on "foo 1," says syntax error on "foo 1," - parses "yield" parses "yield" - parses "foo.^ 1, 2" parses "foo.^ 1, 2" - parses "Foo.bar x.y do\nend" parses "Foo.bar x.y do\nend" - parses "foo(Foo: 1, Bar: 2)" parses "foo(Foo: 1, Bar: 2)" - parses "/ /" parses "/ /" - says syntax error on "def foo(foo struct); end" says syntax error on "def foo(foo struct); end" - parses "a.b /=\n1" parses "a.b /=\n1" - parses "<<-FOO\n\t1\n\tFOO" parses "<<-FOO\n\t1\n\tFOO" - parses "foo(\n begin\n result : Int32 = 1\n result\n end\n )" parses "foo(\n begin\n result : Int32 = 1\n result\n end\n )" - says syntax error on "1 if break" says syntax error on "1 if break" - parses "a.b &+=\n1" parses "a.b &+=\n1" - parses "def !=; end;" parses "def !=; end;" - parses "case 1\nwhen .as?(T)\n2\nend" parses "case 1\nwhen .as?(T)\n2\nend" - parses "Foo(X, sizeof(Int32))" parses "Foo(X, sizeof(Int32))" - says syntax error on "def foo(foo class); end" says syntax error on "def foo(foo class); end" - says syntax error on "1 if return" says syntax error on "1 if return" - says syntax error on "next & 1" says syntax error on "next & 1" - parses "foo.bar(1, 2)" parses "foo.bar(1, 2)" - parses "%r(foo(bar))" parses "%r(foo(bar))" - parses "sizeof(\n Int32\n)" parses "sizeof(\n Int32\n)" - parses "macro foo; 1 + 2; end" parses "macro foo; 1 + 2; end" - parses "property include : Int32" parses "property include : Int32" - parses "abstract def foo(x)" parses "abstract def foo(x)" - parses "def foo(x, **args)\n1\nend" parses "def foo(x, **args)\n1\nend" - says syntax error on "if return; end" says syntax error on "if return; end" - says syntax error on "a = next" says syntax error on "a = next" - says syntax error on "next / 1" says syntax error on "next / 1" - parses "def foo(abstract foo); end" parses "def foo(abstract foo); end" - parses "{% if true %}\n{% end %}\n{% if true %}\n{% end %}" parses "{% if true %}\n{% end %}\n{% if true %}\n{% end %}" - parses "foo.nil?( )" parses "foo.nil?( )" - parses "def self.&; end;" parses "def self.&; end;" - parses "def foo(x y); y; end" parses "def foo(x y); y; end" - parses "foo &.block = 0" parses "foo &.block = 0" - parses "foo if 3" parses "foo if 3" - parses "def foo(x @@return); end" parses "def foo(x @@return); end" - parses "->() { }" parses "->() { }" - says syntax error on "def foo(x : 1); end" says syntax error on "def foo(x : 1); end" - parses "_ = 1" parses "_ = 1" - parses "a = 1; a rescue a" parses "a = 1; a rescue a" - parses "def foo(a, &block : Int -> ); end" parses "def foo(a, &block : Int -> ); end" - parses "def =~(); end" parses "def =~(); end" - parses "struct Foo 'a' end" parses "struct Foo 'a' end" - parses "def /(); end;" parses "def /(); end;" - parses "Foo(typeof(1))" parses "Foo(typeof(1))" - parses "Int[8, 4]" parses "Int[8, 4]" - parses "->::foo!" parses "->::foo!" - parses "macro : Int32" parses "macro : Int32" - parses "foo(bar!)" parses "foo(bar!)" - parses "def foo; / /; end" parses "def foo; / /; end" - says syntax error on "lib Foo; union Bar[1]" says syntax error on "lib Foo; union Bar[1]" - says syntax error on "<<-'HERE\n" says syntax error on "<<-'HERE\n" - parses "1 === 2" parses "1 === 2" - says syntax error on "def foo(foo pointerof); end" says syntax error on "def foo(foo pointerof); end" - gets correct location of empty exception handler inside def gets correct location of empty exception handler inside def - parses "foo(..2)" parses "foo(..2)" - parses "def foo(@@var); end" parses "def foo(@@var); end" - says syntax error on "def foo(foo sizeof); end" says syntax error on "def foo(foo sizeof); end" - says syntax error on "{1, ->{ |_| x } }" says syntax error on "{1, ->{ |_| x } }" - parses "foo(0, n &+ 2)" parses "foo(0, n &+ 2)" - parses "foo(a: n ** 2)" parses "foo(a: n ** 2)" - parses "->foo?" parses "->foo?" - parses "n ** 2" parses "n ** 2" - parses "1 ensure 2" parses "1 ensure 2" - parses "a\nwhile / /\n/ /\nend" parses "a\nwhile / /\n/ /\nend" - parses "{% begin %}%i[ %s ]{% end %}" parses "{% begin %}%i[ %s ]{% end %}" - parses "def foo(@[Foo] outer inner); end" parses "def foo(@[Foo] outer inner); end" - parses "begin; rescue; end" parses "begin; rescue; end" - parses "property private : Int32" parses "property private : Int32" - says syntax error on "lib Foo; enum Bar\"a\"" says syntax error on "lib Foo; enum Bar\"a\"" - says syntax error on "def foo(foo false); end" says syntax error on "def foo(foo false); end" - parses "{% 2 if 1; 3 %}" parses "{% 2 if 1; 3 %}" - says syntax error on "class Foo < Bar[1]" says syntax error on "class Foo < Bar[1]" - parses "case {1, 2}\nwhen foo\n5\nend" parses "case {1, 2}\nwhen foo\n5\nend" - parses "foo &.as(T).bar" parses "foo &.as(T).bar" - says syntax error on "foo[1] = next" says syntax error on "foo[1] = next" - says syntax error on "lib Foo; enum Bar->{}" says syntax error on "lib Foo; enum Bar->{}" - parses "true : Int32" parses "true : Int32" - parses "def foo(@select); end" parses "def foo(@select); end" - says syntax error on "break & 1" says syntax error on "break & 1" - parses "nil" parses "nil" - says syntax error on "->(x, y z) { }" says syntax error on "->(x, y z) { }" - says syntax error on "while break; end" says syntax error on "while break; end" - parses "foo.!~(1, 2) { 3 }" parses "foo.!~(1, 2) { 3 }" - parses "Foo(T, {x: X})" parses "Foo(T, {x: X})" - parses "macro foo;bar{% for x, y in z %}body{% end %}baz;end" parses "macro foo;bar{% for x, y in z %}body{% end %}baz;end" - parses "def foo(x @@include); end" parses "def foo(x @@include); end" - says syntax error on "case 1 == 1 a; when 2; end" says syntax error on "case 1 == 1 a; when 2; end" - parses "return : Int32" parses "return : Int32" - says syntax error on "def foo(x : Int32 | (Int32, Int32)); end" says syntax error on "def foo(x : Int32 | (Int32, Int32)); end" - parses "def Foo.foo\n1\nend" parses "def Foo.foo\n1\nend" - parses "def foo; with a yield; end" parses "def foo; with a yield; end" - says syntax error on "case x; when 1; when _; end" says syntax error on "case x; when 1; when _; end" - parses "foo./(1, 2) { 3 }" parses "foo./(1, 2) { 3 }" - parses "~ 1" parses "~ 1" - says syntax error on "next << 1" says syntax error on "next << 1" - parses "def foo(in foo); end" parses "def foo(in foo); end" - parses "a.b //=\n1" parses "a.b //=\n1" - parses "def foo(@instance_sizeof); end" parses "def foo(@instance_sizeof); end" - says syntax error on "foo { |next| }" says syntax error on "foo { |next| }" - parses "foo.as(Bar)" parses "foo.as(Bar)" - parses "def foo(x @@extend); end" parses "def foo(x @@extend); end" - parses "def foo(x @yield); end" parses "def foo(x @yield); end" - parses "macro foo(@[Foo] **args);end" parses "macro foo(@[Foo] **args);end" - parses "select : Int32" parses "select : Int32" - parses "def &(); end" parses "def &(); end" - correctly computes line number after `\{% -` (#9857) correctly computes line number after `\{% -` (#9857) - parses "def foo(@return); end" parses "def foo(@return); end" - parses "def foo(@@self); end" parses "def foo(@@self); end" - parses "def self.~; end;" parses "def self.~; end;" - parses "->::Foo.foo!" parses "->::Foo.foo!" - says syntax error on "next ... 1" says syntax error on "next ... 1" - says syntax error on "macro foo(\"\" y); end" says syntax error on "macro foo(\"\" y); end" - parses "b.c ||= 1" parses "b.c ||= 1" - parses ":*" parses ":*" - parses "foo.!=" parses "foo.!=" - parses "x, y = <<-FOO, <<-BAR\nhello\nFOO\nworld\nBAR" parses "x, y = <<-FOO, <<-BAR\nhello\nFOO\nworld\nBAR" - parses "->() : Int32 do end" parses "->() : Int32 do end" - parses "foo(z: 0, a: n &- 2)" parses "foo(z: 0, a: n &- 2)" - parses "*a = 1, 2" parses "*a = 1, 2" - parses "a = / /" parses "a = / /" - parses "*_ = 1, 2" parses "*_ = 1, 2" - parses "case {1, 2}\nwhen {.foo, .bar}\n5\nend" parses "case {1, 2}\nwhen {.foo, .bar}\n5\nend" - parses "->(x : Int32) { x }" parses "->(x : Int32) { x }" - parses "foo &.[] = 1" parses "foo &.[] = 1" - parses "def foo(var : Int*); end" parses "def foo(var : Int*); end" - says syntax error on "foo { |(private)| }" says syntax error on "foo { |(private)| }" - end locations - gets corrects end location for "struct Foo; end" gets corrects end location for "struct Foo; end" - gets corrects end location for "foo(1, 2)" gets corrects end location for "foo(1, 2)" - gets corrects end location for "foo ->bar" gets corrects end location for "foo ->bar" - gets corrects end location for "return 1" gets corrects end location for "return 1" - gets corrects end location for "123.45" gets corrects end location for "123.45" - gets corrects end location for "while 1; end" gets corrects end location for "while 1; end" - gets corrects end location for "def foo; rescue ex; end" gets corrects end location for "def foo; rescue ex; end" - gets corrects end location for "foo ->self.bar=" gets corrects end location for "foo ->self.bar=" - gets corrects end location for "alias Foo = Bar" gets corrects end location for "alias Foo = Bar" - gets corrects end location for "!foo" gets corrects end location for "!foo" - gets corrects end location for "begin; 1; 2; 3; end" gets corrects end location for "begin; 1; 2; 3; end" - gets corrects end location for "Foo" gets corrects end location for "Foo" - gets corrects end location for "{} of Int32 => String" gets corrects end location for "{} of Int32 => String" - gets corrects end location for "abstract def foo : Int32" gets corrects end location for "abstract def foo : Int32" - gets corrects end location for ":foo" gets corrects end location for ":foo" - gets corrects end location for "macro foo; 123; end" gets corrects end location for "macro foo; 123; end" - gets corrects end location for "foo ->@@bar.baz=" gets corrects end location for "foo ->@@bar.baz=" - gets corrects end location for "[1, 2]" gets corrects end location for "[1, 2]" - gets corrects end location for "Foo { 1 }" gets corrects end location for "Foo { 1 }" - gets corrects end location for "foo.[0] = 1" gets corrects end location for "foo.[0] = 1" - gets corrects end location for "foo **bar" gets corrects end location for "foo **bar" - gets corrects end location for "foo ->@bar.baz=" gets corrects end location for "foo ->@bar.baz=" - gets corrects end location for "foo.!" gets corrects end location for "foo.!" - gets corrects end location for "foo : Foo*" gets corrects end location for "foo : Foo*" - gets corrects end location for "a && b" gets corrects end location for "a && b" - gets corrects end location for "module Foo; end" gets corrects end location for "module Foo; end" - gets corrects end location for "case :foo; when :bar; 2; end" gets corrects end location for "case :foo; when :bar; 2; end" - gets corrects end location for "foo" gets corrects end location for "foo" - gets corrects end location for "{a: 1}" gets corrects end location for "{a: 1}" - gets corrects end location for "x : Foo ->" gets corrects end location for "x : Foo ->" - gets corrects end location for "123" gets corrects end location for "123" - gets corrects end location for "{%\nif foo\n bar\n end\n%}" gets corrects end location for "{%\nif foo\n bar\n end\n%}" - gets corrects end location for "::foo" gets corrects end location for "::foo" - gets corrects end location for "foo.bar(x) do; end" gets corrects end location for "foo.bar(x) do; end" - gets corrects end location for "foo : Foo.class" gets corrects end location for "foo : Foo.class" - gets corrects end location for "foo ->Bar.baz" gets corrects end location for "foo ->Bar.baz" - gets corrects end location for "foo bar, out baz" gets corrects end location for "foo bar, out baz" - gets corrects end location for "@foo" gets corrects end location for "@foo" - gets corrects end location for "def foo; 1; end" gets corrects end location for "def foo; 1; end" - gets corrects end location for "'a'" gets corrects end location for "'a'" - gets corrects end location for "foo ->bar=" gets corrects end location for "foo ->bar=" - gets corrects end location for "foo &bar" gets corrects end location for "foo &bar" - gets corrects end location for "offsetof(Foo, @a)" gets corrects end location for "offsetof(Foo, @a)" - gets corrects end location for "foo ->@@bar.baz" gets corrects end location for "foo ->@@bar.baz" - gets corrects end location for "foo ->@bar.baz" gets corrects end location for "foo ->@bar.baz" - gets corrects end location for "foo(&.bar)" gets corrects end location for "foo(&.bar)" - gets corrects end location for "pointerof(@foo)" gets corrects end location for "pointerof(@foo)" - gets corrects end location for "yield" gets corrects end location for "yield" - gets corrects end location for "foo 1, 2" gets corrects end location for "foo 1, 2" - gets corrects end location for "foo : Foo[42]" gets corrects end location for "foo : Foo[42]" - gets corrects end location for "asm(\"nop\" ::)" gets corrects end location for "asm(\"nop\" ::)" - gets corrects end location for "include Foo" gets corrects end location for "include Foo" - gets corrects end location for "x : Foo -> Bar" gets corrects end location for "x : Foo -> Bar" - gets corrects end location for "f.x=(foo).bar" gets corrects end location for "f.x=(foo).bar" - gets corrects end location for "1 ensure 2" gets corrects end location for "1 ensure 2" - gets corrects end location for "f.x = foo" gets corrects end location for "f.x = foo" - gets corrects end location for "\"hello\"" gets corrects end location for "\"hello\"" - gets corrects end location for "[] of Int32" gets corrects end location for "[] of Int32" - gets corrects end location for "foo : Foo**" gets corrects end location for "foo : Foo**" - gets corrects end location for "foo.nil?" gets corrects end location for "foo.nil?" - gets corrects end location for "foo.bar= *baz" gets corrects end location for "foo.bar= *baz" - gets corrects end location for "foo.@foo" gets corrects end location for "foo.@foo" - gets corrects end location for "def foo; end" gets corrects end location for "def foo; end" - gets corrects end location for "foo.responds_to? :foo" gets corrects end location for "foo.responds_to? :foo" - gets corrects end location for "macro foo;end" gets corrects end location for "macro foo;end" - gets corrects end location for "1..3" gets corrects end location for "1..3" - gets corrects end location for "class Foo; end" gets corrects end location for "class Foo; end" - gets corrects end location for "extend Foo" gets corrects end location for "extend Foo" - gets corrects end location for "if 1; elseif; 2; end" gets corrects end location for "if 1; elseif; 2; end" - gets corrects end location for "1 rescue 2" gets corrects end location for "1 rescue 2" - gets corrects end location for "a, b = 1, 2" gets corrects end location for "a, b = 1, 2" - gets corrects end location for "->{ }" gets corrects end location for "->{ }" - gets corrects end location for "begin; 1; end" gets corrects end location for "begin; 1; end" - gets corrects end location for "a, b = 1, 2 if 3" gets corrects end location for "a, b = 1, 2 if 3" - gets corrects end location for "foo(\n &.block\n)" gets corrects end location for "foo(\n &.block\n)" - gets corrects end location for "a = 123" gets corrects end location for "a = 123" - gets corrects end location for "unless 1; 2; end" gets corrects end location for "unless 1; 2; end" - gets corrects end location for "sizeof(Foo)" gets corrects end location for "sizeof(Foo)" - gets corrects end location for "f.x=(*foo)" gets corrects end location for "f.x=(*foo)" - gets corrects end location for "foo.nil?( )" gets corrects end location for "foo.nil?( )" - gets corrects end location for "nil" gets corrects end location for "nil" - gets corrects end location for "foo *bar" gets corrects end location for "foo *bar" - gets corrects end location for "@a = uninitialized Foo" gets corrects end location for "@a = uninitialized Foo" - gets corrects end location for "Foo?" gets corrects end location for "Foo?" - gets corrects end location for "foo &.bar" gets corrects end location for "foo &.bar" - gets corrects end location for "%w(one two)" gets corrects end location for "%w(one two)" - gets corrects end location for "1 if 2" gets corrects end location for "1 if 2" - gets corrects end location for "typeof(1)" gets corrects end location for "typeof(1)" - gets corrects end location for "a || b" gets corrects end location for "a || b" - gets corrects end location for "require \"foo\"" gets corrects end location for "require \"foo\"" - gets corrects end location for "yield 1" gets corrects end location for "yield 1" - gets corrects end location for "Int[8]?" gets corrects end location for "Int[8]?" - gets corrects end location for "foo ->bar(Baz)" gets corrects end location for "foo ->bar(Baz)" - gets corrects end location for "\"hello \"\\\n\"world\"" gets corrects end location for "\"hello \"\\\n\"world\"" - gets corrects end location for "select; when foo; 2; end" gets corrects end location for "select; when foo; 2; end" - gets corrects end location for "if 1; else; 2; end" gets corrects end location for "if 1; else; 2; end" - gets corrects end location for "@@a = uninitialized Foo" gets corrects end location for "@@a = uninitialized Foo" - gets corrects end location for "1.." gets corrects end location for "1.." - gets corrects end location for "foo : Foo?" gets corrects end location for "foo : Foo?" - gets corrects end location for "offsetof({X, Y}, 1)" gets corrects end location for "offsetof({X, Y}, 1)" - gets corrects end location for "[1, 2,]" gets corrects end location for "[1, 2,]" - gets corrects end location for "Foo(A)" gets corrects end location for "Foo(A)" - gets corrects end location for "/foo/" gets corrects end location for "/foo/" - gets corrects end location for "abstract def foo(x)" gets corrects end location for "abstract def foo(x)" - gets corrects end location for "foo ->self.bar" gets corrects end location for "foo ->self.bar" - gets corrects end location for "1.as(Int32)" gets corrects end location for "1.as(Int32)" - gets corrects end location for "foo ->Bar.baz=" gets corrects end location for "foo ->Bar.baz=" - gets corrects end location for "foo.responds_to?(:foo)" gets corrects end location for "foo.responds_to?(:foo)" - gets corrects end location for "return" gets corrects end location for "return" - gets corrects end location for "foo.!()" gets corrects end location for "foo.!()" - gets corrects end location for "@@foo" gets corrects end location for "@@foo" - gets corrects end location for "false" gets corrects end location for "false" - gets corrects end location for "x : Foo(A, *B, C)" gets corrects end location for "x : Foo(A, *B, C)" - gets corrects end location for "{1, 2}" gets corrects end location for "{1, 2}" - gets corrects end location for "abstract def foo" gets corrects end location for "abstract def foo" - gets corrects end location for "foo(&bar)" gets corrects end location for "foo(&bar)" - gets corrects end location for "puts obj.foo" gets corrects end location for "puts obj.foo" - parses "{% begin %}%w< %s >{% end %}" parses "{% begin %}%w< %s >{% end %}" - parses "{[] of Foo, Bar::Baz * 2}" parses "{[] of Foo, Bar::Baz * 2}" - says syntax error on "def foo(x y, x z); end" says syntax error on "def foo(x y, x z); end" - parses "foo.!~ 1, 2" parses "foo.!~ 1, 2" - says syntax error on "foo { |private| }" says syntax error on "foo { |private| }" - parses "1 =~ 2" parses "1 =~ 2" - parses "a.b &*=\n1" parses "a.b &*=\n1" - says syntax error on "lib Foo; union Bar{|a|a}" says syntax error on "lib Foo; union Bar{|a|a}" - says syntax error on "enum Foo : Int32:Qux" says syntax error on "enum Foo : Int32:Qux" - parses "def foo(x @abstract); end" parses "def foo(x @abstract); end" - parses "\"hello \" \\\r\n \"world\"" parses "\"hello \" \\\r\n \"world\"" - parses "case 1\nwhen .is_a?(T)\n2\nend" parses "case 1\nwhen .is_a?(T)\n2\nend" - parses ":===" parses ":===" - parses "if foo; 1; else; 2; end" parses "if foo; 1; else; 2; end" - parses "foo = 1; b = 2; foo -b" parses "foo = 1; b = 2; foo -b" - parses ":\"\\\"foo\"" parses ":\"\\\"foo\"" - parses "case;end" parses "case;end" - parses "foo &.block[]" parses "foo &.block[]" - parses "@@foo" parses "@@foo" - says syntax error on "foo { |protected| }" says syntax error on "foo { |protected| }" - parses "->Foo.foo!" parses "->Foo.foo!" - parses ":>>" parses ":>>" - says syntax error on "def foo(asm); end" says syntax error on "def foo(asm); end" - parses "->::foo=" parses "->::foo=" - parses "def self.+(); end;" parses "def self.+(); end;" - parses "foo.!" parses "foo.!" - says syntax error on "annotation Foo\"a\"" says syntax error on "annotation Foo\"a\"" - parses "def foo(var); end" parses "def foo(var); end" - parses "{% for _, x, _ in y %}body{% end %}" parses "{% for _, x, _ in y %}body{% end %}" - parses ":\u304B\u305F\u306A" parses ":\u304B\u305F\u306A" - says syntax error on "-> :Int32 { }" says syntax error on "-> :Int32 { }" - parses "macro foo\n'\\\\'\nend" parses "macro foo\n'\\\\'\nend" - parses "def foo(var : Int?); end" parses "def foo(var : Int?); end" - says syntax error on "break % 1" says syntax error on "break % 1" - says syntax error on "class Foo < Bar%x()" says syntax error on "class Foo < Bar%x()" - parses "def []=(value); end" parses "def []=(value); end" - says syntax error on "def foo(foo extend); end" says syntax error on "def foo(foo extend); end" - parses "1 &+ 2" parses "1 &+ 2" - parses "1.as?(Bar)" parses "1.as?(Bar)" - parses "yield foo do\nend" parses "yield foo do\nend" - says syntax error on "next[0]" says syntax error on "next[0]" - parses "extend : Int32" parses "extend : Int32" - parses "foo.&" parses "foo.&" - parses "macro foo(**args)\n1\nend" parses "macro foo(**args)\n1\nend" - says syntax error on "yield next" says syntax error on "yield next" - parses "property require : Int32" parses "property require : Int32" - parses ":[]=" parses ":[]=" - parses "def foo(true foo); end" parses "def foo(true foo); end" - parses "<<-HERE\n One\n\n Zero\n HERE" parses "<<-HERE\n One\n\n Zero\n HERE" - parses "foo out @x; @x" parses "foo out @x; @x" - parses "begin; 1; rescue Foo; 2; end" parses "begin; 1; rescue Foo; 2; end" - says syntax error on "next ^ 1" says syntax error on "next ^ 1" - parses "foo(0, n ^ 2)" parses "foo(0, n ^ 2)" - says syntax error on "foo { |(enum)| }" says syntax error on "foo { |(enum)| }" - parses "foo.=== 1, 2" parses "foo.=== 1, 2" - parses "case 1\nin nil; 2; end" parses "case 1\nin nil; 2; end" - parses "macro foo;bar{% if x %}body{% end %}baz;end" parses "macro foo;bar{% if x %}body{% end %}baz;end" - says syntax error on "next.as(Int32)" says syntax error on "next.as(Int32)" - says syntax error on "lib Foo->(x : Qux){}" says syntax error on "lib Foo->(x : Qux){}" - parses "def foo(instance_sizeof foo); end" parses "def foo(instance_sizeof foo); end" - says syntax error on "{a: 1, b: 2 c: 3}" says syntax error on "{a: 1, b: 2 c: 3}" - parses "a = 1; a /b" parses "a = 1; a /b" - parses "->Foo.*(Int32)" parses "->Foo.*(Int32)" - parses "(bar do\nend)" parses "(bar do\nend)" - parses "foo.>" parses "foo.>" - parses "begin; 1; ensure; 2; end" parses "begin; 1; ensure; 2; end" - parses "typeof(\n 1\n)" parses "typeof(\n 1\n)" - parses "def foo(x : *T -> R); end" parses "def foo(x : *T -> R); end" - parses "@foo = 1" parses "@foo = 1" - says syntax error on "return / 1" says syntax error on "return / 1" - parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) : \"eax\", \"ebx\"\n: \"volatile\", \"alignstack\"\n,\n\"intel\"\n)" parses "asm(\"nop\" :: \"b\"(1), \"c\"(2) : \"eax\", \"ebx\"\n: \"volatile\", \"alignstack\"\n,\n\"intel\"\n)" - parses "->@foo.foo" parses "->@foo.foo" - parses "{% unless 1; 2; end; %}" parses "{% unless 1; 2; end; %}" - parses "def foo(@struct); end" parses "def foo(@struct); end" - parses "{% unless 1\n x\nend %}" parses "{% unless 1\n x\nend %}" - parses "\"hello \"\\\n\"world\"" parses "\"hello \"\\\n\"world\"" - parses "4./(2)" parses "4./(2)" - parses "@[Foo()]" parses "@[Foo()]" - parses "1 -\n2" parses "1 -\n2" - parses "Foo(\"foo bar\": U)" parses "Foo(\"foo bar\": U)" - parses "sizeof(X)" parses "sizeof(X)" - parses "@@foo = 1" parses "@@foo = 1" - parses "def ===(); end" parses "def ===(); end" - parses "instance_alignof(\n Int32\n)" parses "instance_alignof(\n Int32\n)" - says syntax error on "lib Foo; enum Bar%w()" says syntax error on "lib Foo; enum Bar%w()" - parses "a.b *=\n1" parses "a.b *=\n1" - says syntax error on "foo { |include| }" says syntax error on "foo { |include| }" - parses "n // 2" parses "n // 2" - parses "def self.<(); end;" parses "def self.<(); end;" - parses "def foo(x @@break); end" parses "def foo(x @@break); end" - parses "Int[8]?" parses "Int[8]?" - parses "def <(); end;" parses "def <(); end;" - parses ":\"\\a\\b\\n\\r\\t\\v\\f\\e\"" parses ":\"\\a\\b\\n\\r\\t\\v\\f\\e\"" - parses "lib LibC\nfun getch = \"get.char\"\nend" parses "lib LibC\nfun getch = \"get.char\"\nend" - parses "/fo\#{1}o/" parses "/fo\#{1}o/" - says syntax error on "foo { |(next)| }" says syntax error on "foo { |(next)| }" - parses "->Foo.!~(Int32)" parses "->Foo.!~(Int32)" - parses "lib Foo::Bar\nend" parses "lib Foo::Bar\nend" - says syntax error on "def foo(x\n,y); 1; end" says syntax error on "def foo(x\n,y); 1; end" - parses "puts a if true" parses "puts a if true" - parses "def foo(var : self); end" parses "def foo(var : self); end" - parses "responds_to?(:foo)" parses "responds_to?(:foo)" - sets correct location of var in macro for loop sets correct location of var in macro for loop - parses ":^" parses ":^" - parses "struct Foo {1} end" parses "struct Foo {1} end" - says syntax error on "{1, 2\n,3}" says syntax error on "{1, 2\n,3}" - parses "asm(\"nop\" : : )" parses "asm(\"nop\" : : )" - says syntax error on "1 ... return" says syntax error on "1 ... return" - parses "def foo(typeof foo); end" parses "def foo(typeof foo); end" - says syntax error on "lib Foo; enum Bar'a'" says syntax error on "lib Foo; enum Bar'a'" - parses "puts {{**1}}" parses "puts {{**1}}" - parses "foo a, / /" parses "foo a, / /" - says syntax error on "def foo(foo until); end" says syntax error on "def foo(foo until); end" - parses "{{a = 1 if 2}}" parses "{{a = 1 if 2}}" - parses "def foo(x @include); end" parses "def foo(x @include); end" - sets correct location for fun def with body sets correct location for fun def with body - abbreviated assignment - parses "f.x &-= 2" parses "f.x &-= 2" - parses "f.x -= 2" parses "f.x -= 2" - parses "f.x ^= 2" parses "f.x ^= 2" - parses "f.x &+= 2" parses "f.x &+= 2" - parses "f.x *= 2" parses "f.x *= 2" - parses "f.x <<= 2" parses "f.x <<= 2" - parses "f.x &*= 2" parses "f.x &*= 2" - parses "f.x /= 2" parses "f.x /= 2" - parses "f.x **= 2" parses "f.x **= 2" - parses "f.x |= 2" parses "f.x |= 2" - parses "f.x >>= 2" parses "f.x >>= 2" - parses "f.x %= 2" parses "f.x %= 2" - parses "f.x //= 2" parses "f.x //= 2" - parses "f.x += 2" parses "f.x += 2" - parses "f.x &= 2" parses "f.x &= 2" - parses "def foo(out foo); end" parses "def foo(out foo); end" - parses "@[Foo(1, foo: 2\n)]" parses "@[Foo(1, foo: 2\n)]" - parses "{% begin %}%i{ %s }{% end %}" parses "{% begin %}%i{ %s }{% end %}" - says syntax error on "def foo(x : {sizeof(Int32), 2}); end" says syntax error on "def foo(x : {sizeof(Int32), 2}); end" - parses "a, b = 1" parses "a, b = 1" - says syntax error on "macro foo&&;end" says syntax error on "macro foo&&;end" - parses "def foo(@protected); end" parses "def foo(@protected); end" - says syntax error on "foo { |(until)| }" says syntax error on "foo { |(until)| }" - parses "\n\n__LINE__" parses "\n\n__LINE__" - parses "->(x : Int32) { }" parses "->(x : Int32) { }" - parses "struct Foo %w() end" parses "struct Foo %w() end" - says syntax error on "foo { |instance_sizeof| }" says syntax error on "foo { |instance_sizeof| }" - parses "foo.responds_to?(:foo)" parses "foo.responds_to?(:foo)" - says syntax error on "def foo(include); end" says syntax error on "def foo(include); end" - parses "def //(); end" parses "def //(); end" - parses "Foo(X, instance_sizeof(Int32))" parses "Foo(X, instance_sizeof(Int32))" - says syntax error on "def foo(foo offsetof); end" says syntax error on "def foo(foo offsetof); end" - says syntax error on "a b: 0 = 1" says syntax error on "a b: 0 = 1" - parses "def foo(@def); end" parses "def foo(@def); end" - parses "{% begin %}%w( %s ){% end %}" parses "{% begin %}%w( %s ){% end %}" - parses "enum Foo; @[Bar]; end" parses "enum Foo; @[Bar]; end" - says syntax error on "foo { |return| }" says syntax error on "foo { |return| }" - says syntax error on "def foo():String\nend" says syntax error on "def foo():String\nend" - says syntax error on "{\n\"foo\"\n\"bar\"\n}" says syntax error on "{\n\"foo\"\n\"bar\"\n}" - says syntax error on "foo { |(true)| }" says syntax error on "foo { |(true)| }" - says syntax error on "return & 1" says syntax error on "return & 1" - parses "def foo(x @@lib); end" parses "def foo(x @@lib); end" - says syntax error on "{\"foo\" => 1, \"bar\": 2}" says syntax error on "{\"foo\" => 1, \"bar\": 2}" - parses "def foo(@out); end" parses "def foo(@out); end" - parses ":\"foo\"" parses ":\"foo\"" - parses "1 - 2" parses "1 - 2" - says syntax error on "def foo(**a foo); end" says syntax error on "def foo(**a foo); end" - parses "a.b +=\n1" parses "a.b +=\n1" - parses "def foo(&block :\n Int ->); end" parses "def foo(&block :\n Int ->); end" - parses "foo.&(1, 2)" parses "foo.&(1, 2)" - parses "module Foo %w() end" parses "module Foo %w() end" - parses "- 1" parses "- 1" - parses "a = 1; a += 10 if a += 20" parses "a = 1; a += 10 if a += 20" - parses "break : Int32" parses "break : Int32" - parses "next *1, 2" parses "next *1, 2" - parses "::T/1" parses "::T/1" - says syntax error on "def foo=(**kwargs); end" says syntax error on "def foo=(**kwargs); end" - parses "foo[*baz] = 1" parses "foo[*baz] = 1" - parses "foo(a: 1, &block)" parses "foo(a: 1, &block)" - parses "def foo(x @break); end" parses "def foo(x @break); end" - says syntax error on "break .. 1" says syntax error on "break .. 1" - parses "case 1\nwhen 1\n2\nend\nif a\nend" parses "case 1\nwhen 1\n2\nend\nif a\nend" - says syntax error on "*a, b, c, d = 1, 2" says syntax error on "*a, b, c, d = 1, 2" - parses "foo = 1; foo(+1)" parses "foo = 1; foo(+1)" - says syntax error on "*a if true" says syntax error on "*a if true" - says syntax error on "enum Foo : Int32\"a\"" says syntax error on "enum Foo : Int32\"a\"" - says syntax error on "macro foo *y;end" says syntax error on "macro foo *y;end" - parses ":/" parses ":/" - parses "...2" parses "...2" - says syntax error on "break &* 1" says syntax error on "break &* 1" - parses "foo(n == 2)" parses "foo(n == 2)" - parses "def foo(@@typeof); end" parses "def foo(@@typeof); end" - parses "return *{1, 2}" parses "return *{1, 2}" - says syntax error on "enum Foo[1]" says syntax error on "enum Foo[1]" - parses "self" parses "self" - parses "foo(a: n &** 2)" parses "foo(a: n &** 2)" - parses "property while : Int32" parses "property while : Int32" - parses "var.@foo" parses "var.@foo" - parses "property when : Int32" parses "property when : Int32" - parses ":**" parses ":**" - parses "foo.+(1, 2) { 3 }" parses "foo.+(1, 2) { 3 }" - parses "foo(&block)" parses "foo(&block)" - parses "def /(); end;" parses "def /(); end;" - parses "->Foo.&(Int32)" parses "->Foo.&(Int32)" - parses "foo(\na: 1,\n)" parses "foo(\na: 1,\n)" - parses "1 +2.0" parses "1 +2.0" - parses "select\nwhen foo\n2\nend" parses "select\nwhen foo\n2\nend" - parses "Foo(T?)" parses "Foo(T?)" - parses "typeof(1)" parses "typeof(1)" - parses "foo[1] /2" parses "foo[1] /2" - parses "_, _ = 1, 2" parses "_, _ = 1, 2" - sets correct location of argument in named tuple type sets correct location of argument in named tuple type - parses "def foo(a, &block : *Int -> ); end" parses "def foo(a, &block : *Int -> ); end" - parses "def self.%; end;" parses "def self.%; end;" - parses "def foo(@@false); end" parses "def foo(@@false); end" - parses "def foo(x @macro); end" parses "def foo(x @macro); end" - parses "\"foo\"" parses "\"foo\"" - parses "def %(); end;" parses "def %(); end;" - parses "x.foo(a: 1, b: 2)" parses "x.foo(a: 1, b: 2)" - parses "Set() {1, 2, 3}" parses "Set() {1, 2, 3}" - says syntax error on "def foo(foo break); end" says syntax error on "def foo(foo break); end" - says syntax error on "foo &.[](0) = 1" says syntax error on "foo &.[](0) = 1" - parses "def >(); end" parses "def >(); end" - says syntax error on "lib Foo; struct Bar:qux" says syntax error on "lib Foo; struct Bar:qux" - gets correct location after macro with yield gets correct location after macro with yield - says syntax error on "%w{one}}" says syntax error on "%w{one}}" - says syntax error on "class Foo < Bar'a'" says syntax error on "class Foo < Bar'a'" - parses "struct Foo ->(x : Bar){} end" parses "struct Foo ->(x : Bar){} end" - parses "foo.bar do end" parses "foo.bar do end" - says syntax error on "class Foo < Bar:qux" says syntax error on "class Foo < Bar:qux" - parses "{% begin %}%i< %s >{% end %}" parses "{% begin %}%i< %s >{% end %}" - parses "lib LibC\nfun getchar : (->)?\nend" parses "lib LibC\nfun getchar : (->)?\nend" - parses "foo(1)" parses "foo(1)" - parses "1.0_f32" parses "1.0_f32" - says syntax error on "next[]" says syntax error on "next[]" - parses "def self.===(); end;" parses "def self.===(); end;" - parses "foo { 1 }" parses "foo { 1 }" - parses "struct Foo < Bar :Qux end" parses "struct Foo < Bar :Qux end" - says syntax error on "def foo(x = 1, y); end" says syntax error on "def foo(x = 1, y); end" - says syntax error on "break | 1" says syntax error on "break | 1" - parses "case 1\nwhen .responds_to?(:foo)\n2\nend" parses "case 1\nwhen .responds_to?(:foo)\n2\nend" - parses "foo(n &- 2)" parses "foo(n &- 2)" - parses "foo &.as?(T).bar" parses "foo &.as?(T).bar" - parses "foo(z: 0, a: n / 2)" parses "foo(z: 0, a: n / 2)" - parses "def foo; 1; 2; end" parses "def foo; 1; 2; end" - parses "until true; 1; end;" parses "until true; 1; end;" - says syntax error on "A = begin; 1; rescue; 1; else; B = 1; end" says syntax error on "A = begin; 1; rescue; 1; else; B = 1; end" - says syntax error on "next <= 1" says syntax error on "next <= 1" - parses "property in : Int32" parses "property in : Int32" - parses "Set {1, 2, 3}" parses "Set {1, 2, 3}" - parses "1 >> 2" parses "1 >> 2" - parses "2**3**4" parses "2**3**4" - parses "a = 1; a &-=\n1" parses "a = 1; a &-=\n1" - parses "yield : Int32" parses "yield : Int32" - parses "foo + 1" parses "foo + 1" - says syntax error on "A = begin; B = 1; end" says syntax error on "A = begin; B = 1; end" - parses "def foo(**args)\nargs\nend" parses "def foo(**args)\nargs\nend" - parses "{% begin %}%r{\\A}{% end %}" parses "{% begin %}%r{\\A}{% end %}" - parses ":!~" parses ":!~" - parses "def foo(x @true); end" parses "def foo(x @true); end" - parses "next {1, 2}" parses "next {1, 2}" - says syntax error on "foo.[]? += 1" says syntax error on "foo.[]? += 1" - parses "def foo(x @offsetof); end" parses "def foo(x @offsetof); end" - parses "a = 1; a[2] ||= 3" parses "a = 1; a[2] ||= 3" - parses "a = 1; a /= 1" parses "a = 1; a /= 1" - parses "def foo(@next); end" parses "def foo(@next); end" - says syntax error on "macro Foo.bar;end" says syntax error on "macro Foo.bar;end" - parses "def foo(x @false); end" parses "def foo(x @false); end" - says syntax error on "def foo @var, █ end" says syntax error on "def foo @var, █ end" - says syntax error on "module Foo:qux" says syntax error on "module Foo:qux" - parses "def foo\n1\nend\nif 1\nend" parses "def foo\n1\nend\nif 1\nend" - parses "foo.!= 1, 2" parses "foo.!= 1, 2" - parses "foo *bar" parses "foo *bar" - parses "Foo(\nx:\nT,\ny:\nU,\n)" parses "Foo(\nx:\nT,\ny:\nU,\n)" - parses "def foo(x @@select); end" parses "def foo(x @@select); end" - parses "foo.=== do end" parses "foo.=== do end" - parses "def &*(); end" parses "def &*(); end" - parses "foo &.nil?" parses "foo &.nil?" - parses ":\"\\\"foo\\\"\"" parses ":\"\\\"foo\\\"\"" - says syntax error on "@foo :: Foo" says syntax error on "@foo :: Foo" - says syntax error on "return ** 1" says syntax error on "return ** 1" - parses "def foo(x @case); end" parses "def foo(x @case); end" - says syntax error on "break === 1" says syntax error on "break === 1" - parses "def self.^; end;" parses "def self.^; end;" - says syntax error on "a {} = 1" says syntax error on "a {} = 1" - says syntax error on "def foo(x : (*Int32)); end" says syntax error on "def foo(x : (*Int32)); end" - parses "def self.>(); end;" parses "def self.>(); end;" - parses "1/2" parses "1/2" - parses "def self.>; end;" parses "def self.>; end;" - parses "def foo(bar? foo); end" parses "def foo(bar? foo); end" - parses "module Foo; end" parses "module Foo; end" - parses "{% if 1; 2; end; 3 %}" parses "{% if 1; 2; end; 3 %}" - says syntax error on "def foo(var : Foo+); end" says syntax error on "def foo(var : Foo+); end" - says syntax error on "def foo(x : U) forall; end" says syntax error on "def foo(x : U) forall; end" - parses "Foo(\n)" parses "Foo(\n)" - parses "def foo(a, @[Foo] &block); end" parses "def foo(a, @[Foo] &block); end" - parses "def foo(@class); end" parses "def foo(@class); end" - block associativity - surprise one: binds to second-to-the-right (#15303) - parses "a b c d e do; end" parses "a b c d e do; end" - parses "a b c d e {}" parses "a b c d e {}" - surprise four: parentheses affect block binding (#15303) - parses "a 1, (2), b do end" parses "a 1, (2), b do end" - parses "a 1, (2), b {}" parses "a 1, (2), b {}" - surprise two: block chains bind right-to-left starting from second-to-the-right (#15303) - parses "a b c d e { 1 } { 2 } do 3 end { 4 }" parses "a b c d e { 1 } { 2 } do 3 end { 4 }" - parses "a b c d e do 1 end do 2 end { 3 } do 4 end" parses "a b c d e do 1 end do 2 end { 3 } do 4 end" - surprise three: arguments affect block binding (#15303) - parses "a b c d e 1, 2 {}" parses "a b c d e 1, 2 {}" - parses "a b c d e 1, 2 do; end" parses "a b c d e 1, 2 do; end" - parses "case 1; when x then 2; else; 3; end" parses "case 1; when x then 2; else; 3; end" - says syntax error on "def foo(foo select); end" says syntax error on "def foo(foo select); end" - says syntax error on "def foo var; end" says syntax error on "def foo var; end" - parses "def foo(struct foo); end" parses "def foo(struct foo); end" - parses "{% begin %}%i| %s |{% end %}" parses "{% begin %}%i| %s |{% end %}" - says syntax error on "def foo(true); end" says syntax error on "def foo(true); end" - parses "case {1, 2}\nwhen {3, 4}, {5, 6}\n7\nend" parses "case {1, 2}\nwhen {3, 4}, {5, 6}\n7\nend" - says syntax error on "macro foo x y; end" says syntax error on "macro foo x y; end" - says syntax error on "{1, ->do\n|x| x\end }" says syntax error on "{1, ->do\n|x| x\end }" - parses "1.=~(2)" parses "1.=~(2)" - says syntax error on "->::foo.foo" says syntax error on "->::foo.foo" - parses "def -(); end" parses "def -(); end" - says syntax error on "lib Foo; enum Bar{|a|a}" says syntax error on "lib Foo; enum Bar{|a|a}" - parses "foo(a: n === 2)" parses "foo(a: n === 2)" - says syntax error on "enum Foo : Int32%()" says syntax error on "enum Foo : Int32%()" - parses "a\nwhile / /; / /; end" parses "a\nwhile / /; / /; end" - parses "enum Foo; A\nB; C\nD = 1; end" parses "enum Foo; A\nB; C\nD = 1; end" - gets corrects end location for block with { ... } gets corrects end location for block with { ... } - parses "foo(n * 2)" parses "foo(n * 2)" - parses "a[] = 1" parses "a[] = 1" - parses "foo &.@bar[baz]" parses "foo &.@bar[baz]" - parses "annotation Foo\n\nend" parses "annotation Foo\n\nend" - parses "def foo(x @alias); end" parses "def foo(x @alias); end" - parses "1 + 2" parses "1 + 2" - parses "foo.^" parses "foo.^" - parses "Foo({\"foo bar\": X})" parses "Foo({\"foo bar\": X})" - parses "{{ //.options }}" parses "{{ //.options }}" - says syntax error on "def foo(x, x); end" says syntax error on "def foo(x, x); end" - says syntax error on "macro foo(**x, y)" says syntax error on "macro foo(**x, y)" - parses "def &(); end;" parses "def &(); end;" - says syntax error on "foo { |(asm)| }" says syntax error on "foo { |(asm)| }" - parses "foo(n =~ 2)" parses "foo(n =~ 2)" - parses "def *(); end" parses "def *(); end" - parses "break;" parses "break;" - parses "n !~ 2" parses "n !~ 2" - parses "property pointerof : Int32" parses "property pointerof : Int32" - parses "def foo(@abstract); end" parses "def foo(@abstract); end" - says syntax error on "case x; when nil; 2; when nil; end" says syntax error on "case x; when nil; 2; when nil; end" - says syntax error on "foo { |(lib)| }" says syntax error on "foo { |(lib)| }" - parses "{foo:'a', bar:'b'}" parses "{foo:'a', bar:'b'}" - parses "%i(foo(bar) baz)" parses "%i(foo(bar) baz)" - parses "def foo ; 1 ; end" parses "def foo ; 1 ; end" - parses "foo\n #comment\n .bar" parses "foo\n #comment\n .bar" - parses "foo(a: n =~ 2)" parses "foo(a: n =~ 2)" - parses "foo bar.baz(1) do\nend" parses "foo bar.baz(1) do\nend" - parses "def foo(@unless); end" parses "def foo(@unless); end" - parses "%i{(one two)}" parses "%i{(one two)}" - parses "a = 1; a -=\n1" parses "a = 1; a -=\n1" - parses "foo % r()" parses "foo % r()" - parses "foo.bar.baz" parses "foo.bar.baz" - parses "foo.bar=(*baz)" parses "foo.bar=(*baz)" - parses "def self.foo=()\n1\nend" parses "def self.foo=()\n1\nend" - parses "if foo\n1\nend" parses "if foo\n1\nend" - parses "def foo(x, **args, &block)\n1\nend" parses "def foo(x, **args, &block)\n1\nend" - parses "x.foo a: 1, b: 2 " parses "x.foo a: 1, b: 2 " - parses "def foo(x @@with); end" parses "def foo(x @@with); end" - parses "def foo(x = __FILE__); end" parses "def foo(x = __FILE__); end" - parses "property begin : Int32" parses "property begin : Int32" - parses "foo[*baz]" parses "foo[*baz]" - parses "def foo(x @in); end" parses "def foo(x @in); end" - parses "Foo::Bar?" parses "Foo::Bar?" - says syntax error on "(1, 2 3)" says syntax error on "(1, 2 3)" - parses "foo(z: 0, a: n * 2)" parses "foo(z: 0, a: n * 2)" - parses "def foo(@break); end" parses "def foo(@break); end" - says syntax error on "def foo(alias); end" says syntax error on "def foo(alias); end" - says syntax error on "def foo=(&block); end" says syntax error on "def foo=(&block); end" - says syntax error on "def foo(foo alias); end" says syntax error on "def foo(foo alias); end" - says syntax error on "foo { |x, (x)| }" says syntax error on "foo { |x, (x)| }" - parses "foo(0, n / 2)" parses "foo(0, n / 2)" - parses "foo(&.as?(T).bar)" parses "foo(&.as?(T).bar)" - parses "foo(n - 2)" parses "foo(n - 2)" - says syntax error on "a = 1; a += break" says syntax error on "a = 1; a += break" - parses "typeof : Int32" parses "typeof : Int32" - parses "foo(1 + 2)" parses "foo(1 + 2)" - parses "@[Foo(1)]" parses "@[Foo(1)]" - parses "a = 1; a ^= 1" parses "a = 1; a ^= 1" - parses "foo *{1}" parses "foo *{1}" - parses "lib LibC; struct Foo; x : Int*; end end" parses "lib LibC; struct Foo; x : Int*; end end" - says syntax error on "def foo(foo enum); end" says syntax error on "def foo(foo enum); end" - parses "def self.foo()\n1\nend" parses "def self.foo()\n1\nend" - parses "def foo(@@until); end" parses "def foo(@@until); end" - parses "lib LibC; type A = B*; end" parses "lib LibC; type A = B*; end" - parses "def foo(x @end); end" parses "def foo(x @end); end" - parses "case;when true;1;end" parses "case;when true;1;end" - parses "def foo(x, *y : Int32); 1; end" parses "def foo(x, *y : Int32); 1; end" - parses "lib LibC\n$errno = Foo : Int32\nend" parses "lib LibC\n$errno = Foo : Int32\nend" - parses "def self.^(); end;" parses "def self.^(); end;" - parses "Foo??" parses "Foo??" - parses "def foo(x @@unless); end" parses "def foo(x @@unless); end" - parses "offsetof : Int32" parses "offsetof : Int32" - parses "{% begin %}{% if true %}if true{% end %}\n{% if true %}end{% end %}{% end %}" parses "{% begin %}{% if true %}if true{% end %}\n{% if true %}end{% end %}{% end %}" - parses "nil?" parses "nil?" - parses "lib LibC\n$errno : Int32\n$errno2 : Int32\nend" parses "lib LibC\n$errno : Int32\n$errno2 : Int32\nend" - parses "Foo::Bar" parses "Foo::Bar" - parses "{a: 1}" parses "{a: 1}" - parses "foo do |a|; 1; end" parses "foo do |a|; 1; end" - parses "def ==(); end;" parses "def ==(); end;" - parses "foo { |(a, (b, (c, d)))| }" parses "foo { |(a, (b, (c, d)))| }" - says syntax error on "foo x: 1, x: 1" says syntax error on "foo x: 1, x: 1" - parses "break *1, 2" parses "break *1, 2" - parses "def foo(@begin); end" parses "def foo(@begin); end" - parses "*a.foo, a.bar = 1" parses "*a.foo, a.bar = 1" - parses "asm(\"nop\" :::: \"volatile\")" parses "asm(\"nop\" :::: \"volatile\")" - parses "%w{\n}" parses "%w{\n}" - parses "->foo(Int32, Float64)" parses "->foo(Int32, Float64)" - says syntax error on "def foo(foo while); end" says syntax error on "def foo(foo while); end" - parses "foo[] /2" parses "foo[] /2" - says syntax error on "return | 1" says syntax error on "return | 1" - says syntax error on "case 1\nin 1; 2" says syntax error on "case 1\nin 1; 2" - sets correct location for fun def with return type sets correct location for fun def with return type - parses "def self.==; end;" parses "def self.==; end;" - parses "a = 1; a //= 1" parses "a = 1; a //= 1" - says syntax error on "/foo)/" says syntax error on "/foo)/" - parses "puts __LINE__" parses "puts __LINE__" - parses "\"hello \#{1}\" \\\r\n \"\#{2} world\"" parses "\"hello \#{1}\" \\\r\n \"\#{2} world\"" - parses "<<-HERE1; <<-HERE2\nhere1\nHERE1\nHERE2" parses "<<-HERE1; <<-HERE2\nhere1\nHERE1\nHERE2" - parses "foo &.block[0]" parses "foo &.block[0]" - parses "macro foo;bar{% if x %}body{% else %}body2{%end%}baz;end" parses "macro foo;bar{% if x %}body{% else %}body2{%end%}baz;end" - parses "def foo(@yield); end" parses "def foo(@yield); end" - parses "foo &.[0]" parses "foo &.[0]" - parses "case {1}\nin {nil}; 2; end" parses "case {1}\nin {nil}; 2; end" - parses "f.x Foo.new" parses "f.x Foo.new" - parses "+1_i64" parses "+1_i64" - parses "typeof(a = 1); a" parses "typeof(a = 1); a" - parses "def foo(var : self?); end" parses "def foo(var : self?); end" - parses "instance_sizeof : Int32" parses "instance_sizeof : Int32" - says syntax error on "a = 1; a += return" says syntax error on "a = 1; a += return" - parses "{%\n1\n2\n3\n%}" parses "{%\n1\n2\n3\n%}" - says syntax error on "foo { |(while)| }" says syntax error on "foo { |(while)| }" - parses "begin; 1; rescue ::Foo | ::Bar; 2; end" parses "begin; 1; rescue ::Foo | ::Bar; 2; end" - says syntax error on "lib Foo; struct Bar {|a|a}" says syntax error on "lib Foo; struct Bar {|a|a}" - says syntax error on "foo { |if| }" says syntax error on "foo { |if| }" - parses "1.!" parses "1.!" - says syntax error on "%x(" says syntax error on "%x(" - parses "def foo(x @fun); end" parses "def foo(x @fun); end" - parses "def foo(enum foo); end" parses "def foo(enum foo); end" - says syntax error on "@:Foo" says syntax error on "@:Foo" - parses "->Foo.//(Int32)" parses "->Foo.//(Int32)" - parses "lib LibC\nfun getchar(a : Int, b : Float) : Int\nend" parses "lib LibC\nfun getchar(a : Int, b : Float) : Int\nend" - says syntax error on "foo { |(require)| }" says syntax error on "foo { |(require)| }" - parses "1+0" parses "1+0" - parses "@[Foo(\n1, foo: 2\n)]" parses "@[Foo(\n1, foo: 2\n)]" - says syntax error on "def foo(break); end" says syntax error on "def foo(break); end" - parses "foo a: b(1) do\nend" parses "foo a: b(1) do\nend" - parses "[\n1, 2]" parses "[\n1, 2]" - parses "alias : Int32" parses "alias : Int32" - parses "def foo(a, &block : Int -> Double); end" parses "def foo(a, &block : Int -> Double); end" - says syntax error on "return * 1" says syntax error on "return * 1" - parses "foo.!.!" parses "foo.!.!" - says syntax error on "a += 1" says syntax error on "a += 1" - sets correct location of global path in annotation sets correct location of global path in annotation - parses "def foo(end foo); end" parses "def foo(end foo); end" - parses "x[1, ..2]" parses "x[1, ..2]" - parses "def foo(x @extend); end" parses "def foo(x @extend); end" - parses "enum Foo : UInt16; end" parses "enum Foo : UInt16; end" - parses "{% begin %}%w| %s |{% end %}" parses "{% begin %}%w| %s |{% end %}" - parses "macro foo\n <<-FOO, <<-BAR + \"\"\n FOO\n BAR\nend" parses "macro foo\n <<-FOO, <<-BAR + \"\"\n FOO\n BAR\nend" - says syntax error on "annotation Foo->(x : Qux){}" says syntax error on "annotation Foo->(x : Qux){}" - sets correct location of trailing rescue sets correct location of trailing rescue - says syntax error on "def foo(x : Int32, Int32); end" says syntax error on "def foo(x : Int32, Int32); end" - parses "Foo(\"foo\": U, \"bar\": V)" parses "Foo(\"foo\": U, \"bar\": V)" - parses "/\\//" parses "/\\//" - parses "case 1\nin Int32; 2; end" parses "case 1\nin Int32; 2; end" - parses "foo = 1; ->foo.>(Int32)" parses "foo = 1; ->foo.>(Int32)" - parses "class Foo; end" parses "class Foo; end" - says syntax error on "{1, 2 3}" says syntax error on "{1, 2 3}" - says syntax error on "case 1\nwhen .&&(2)" says syntax error on "case 1\nwhen .&&(2)" - parses "def foo(@var); 1; end" parses "def foo(@var); 1; end" - sets correct location of `elsif` of if statement sets correct location of `elsif` of if statement - parses "/fo\\so/" parses "/fo\\so/" - parses "def foo(@@with); end" parses "def foo(@@with); end" - parses "a.b() /3" parses "a.b() /3" - parses " def foo(\n @[Foo]\n id : Int32,\n @[Bar] name : String\n ); end" parses " def foo(\n @[Foo]\n id : Int32,\n @[Bar] name : String\n ); end" - parses "def foo; x { |_| 1 }; end" parses "def foo; x { |_| 1 }; end" - says syntax error on "*a if true = 2" says syntax error on "*a if true = 2" - says syntax error on "nil foo" says syntax error on "nil foo" - says syntax error on "lib LibC\n$Errno : Int32\nend" says syntax error on "lib LibC\n$Errno : Int32\nend" - parses "{1}" parses "{1}" - parses "def self.=~; end;" parses "def self.=~; end;" - sets correct location for fun def on multiple lines sets correct location for fun def on multiple lines - parses "<<-HERE\n One\n Zero\n HERE" parses "<<-HERE\n One\n Zero\n HERE" - parses "false : Int32" parses "false : Int32" - parses "{% if 1; 2; elsif 3; 4; else; 5; end; 6 %}" parses "{% if 1; 2; elsif 3; 4; else; 5; end; 6 %}" - parses "foo.<=(1, 2)" parses "foo.<=(1, 2)" - parses "foo.<(1, 2)" parses "foo.<(1, 2)" - parses "/foo/x" parses "/foo/x" - parses "def foo(while foo); end" parses "def foo(while foo); end" - parses "enum Foo : UInt16 # comment\nend" parses "enum Foo : UInt16 # comment\nend" - says syntax error on "foo.[0]? = 1" says syntax error on "foo.[0]? = 1" - parses "%i(one\\ two)" parses "%i(one\\ two)" - says syntax error on "macro foo(*x, *y); end" says syntax error on "macro foo(*x, *y); end" - says syntax error on "asm(\"\" ::: \"\"(var))" says syntax error on "asm(\"\" ::: \"\"(var))" - parses "def =~(); end;" parses "def =~(); end;" - says syntax error on "case x; when 1..2; 2; when 1..2; end" says syntax error on "case x; when 1..2; 2; when 1..2; end" - parses "puts %w{one two}" parses "puts %w{one two}" - says syntax error on "class Foo->(x : Qux){}" says syntax error on "class Foo->(x : Qux){}" - parses "sizeof : Int32" parses "sizeof : Int32" - parses ":>" parses ":>" - parses "case 1\nwhen .as(T)\n2\nend" parses "case 1\nwhen .as(T)\n2\nend" - says syntax error on "class Foo->{}" says syntax error on "class Foo->{}" - parses "abstract struct Foo; end" parses "abstract struct Foo; end" - parses "->@@foo.foo=" parses "->@@foo.foo=" - parses "def foo(@@true); end" parses "def foo(@@true); end" - parses "def self./; end;" parses "def self./; end;" - parses "def foo(x @@next); end" parses "def foo(x @@next); end" - says syntax error on "1 while 3" says syntax error on "1 while 3" - parses "macro x\n%{}\nend" parses "macro x\n%{}\nend" - says syntax error on "foo { |(pointerof)| }" says syntax error on "foo { |(pointerof)| }" - parses "a : Foo()[12]" parses "a : Foo()[12]" - parses "def foo(\n&block\n); end" parses "def foo(\n&block\n); end" - parses "foo.[]= 1, 2" parses "foo.[]= 1, 2" - parses "1 ** -x" parses "1 ** -x" - parses "def foo(@@return); end" parses "def foo(@@return); end" - sets correct location of Begin within another node sets correct location of Begin within another node - says syntax error on "break ... 1" says syntax error on "break ... 1" - parses "{% unless 1; 2; end %}" parses "{% unless 1; 2; end %}" - sets correct location for fun def sets correct location for fun def - parses "foo ensure 2" parses "foo ensure 2" - parses "break 1, *2" parses "break 1, *2" - parses "def `(cmd); 1; end" parses "def `(cmd); 1; end" - parses "lib LibC; fun foo : Int*; end" parses "lib LibC; fun foo : Int*; end" - says syntax error on "def foo(x @@x); 1; end" says syntax error on "def foo(x @@x); 1; end" - says syntax error on "return % 1" says syntax error on "return % 1" - parses "Foo(T, 1)" parses "Foo(T, 1)" - parses "struct Foo; end" parses "struct Foo; end" - parses "offsetof(X, 1)" parses "offsetof(X, 1)" - says syntax error on "return + 1" says syntax error on "return + 1" - says syntax error on "foo &.[]?=(1)" says syntax error on "foo &.[]?=(1)" - says syntax error on "x++" says syntax error on "x++" - parses "1..;" parses "1..;" - sets correct location of instance variable in proc pointer sets correct location of instance variable in proc pointer - parses "foo(a: n > 2)" parses "foo(a: n > 2)" - says syntax error on "foo &.[0]? = 1" says syntax error on "foo &.[0]? = 1" - sets correct location and end location of `begin` block sets correct location and end location of `begin` block - sets correct location for single node within another node sets correct location for single node within another node - parses "foo a: 1, &block" parses "foo a: 1, &block" - parses "lib LibC; struct Foo; x : Int; y : Float; end end" parses "lib LibC; struct Foo; x : Int; y : Float; end end" - says syntax error on "foo { |sizeof| }" says syntax error on "foo { |sizeof| }" - says syntax error on "+next" says syntax error on "+next" - says syntax error on "{a[0]: 1}" says syntax error on "{a[0]: 1}" - parses "foo(z: 0, a: n &+ 2)" parses "foo(z: 0, a: n &+ 2)" - says syntax error on "foo &.[]? 0 = 1" says syntax error on "foo &.[]? 0 = 1" - says syntax error on "1 as? Bar" says syntax error on "1 as? Bar" - parses "foo = 1; ->foo.+(Int32)" parses "foo = 1; ->foo.+(Int32)" - parses "a.b /2/" parses "a.b /2/" -Semantic: multi assign - strict_multi_assign - errors if assigning non-Indexable to splat (#11414) errors if assigning non-Indexable to splat (#11414) - errors if assigning non-Indexable (#11414) errors if assigning non-Indexable (#11414) - errors if assigning tuple to more targets errors if assigning tuple to more targets - doesn't error if some type in union matches target count doesn't error if some type in union matches target count - errors if assigning tuple to fewer targets errors if assigning tuple to fewer targets - doesn't error if some type in union has no constant size doesn't error if some type in union has no constant size - errors if assigning union of tuples to fewer targets errors if assigning union of tuples to fewer targets - can pass splat variable at top-level to macros (#11596) can pass splat variable at top-level to macros (#11596) - without strict_multi_assign - errors if assigning non-Indexable to splat (#11414) errors if assigning non-Indexable to splat (#11414) - doesn't error if assigning tuple to fewer targets doesn't error if assigning tuple to fewer targets - doesn't error if assigning non-Indexable (#11414) doesn't error if assigning non-Indexable (#11414) -Crystal::Repl::Interpreter - is_a? - does is_a? from NilableType to GenericClassInstanceType (false) does is_a? from NilableType to GenericClassInstanceType (false) - does is_a? from VirtualType to NonGenericClassType (false) does is_a? from VirtualType to NonGenericClassType (false) - does is_a? from NilableType to NonGenericClassType (false) does is_a? from NilableType to NonGenericClassType (false) - does is_a? from NilableType to NonGenericClassType (true) does is_a? from NilableType to NonGenericClassType (true) - does is_a? from NilableProcType to Nil does is_a? from NilableProcType to Nil - does is_a? from NilableType to GenericClassInstanceType (true) does is_a? from NilableType to GenericClassInstanceType (true) - does is_a? from NilableReferenceUnionType to NonGenericClassType (true) does is_a? from NilableReferenceUnionType to NonGenericClassType (true) - does is_a? from VirtualType to NonGenericClassType (true) does is_a? from VirtualType to NonGenericClassType (true) - does is_a? from NilableReferenceUnionType to NonGenericClassType (false) does is_a? from NilableReferenceUnionType to NonGenericClassType (false) - does is_a? from NilableProcType to non-Nil does is_a? from NilableProcType to non-Nil -Semantic: splat - uses bare * uses bare * - calls super with implicit splat arg (#1001) calls super with implicit splat arg (#1001) - forwards tuple in return statement forwards tuple in return statement - errors with too many non-splat type arguments errors with too many non-splat type arguments - matches with type var and splat of itself inside explicit Union (3) matches with type var and splat of itself inside explicit Union (3) - doesn't crash on non-match (#2521) doesn't crash on non-match (#2521) - errors with too few non-splat type arguments (2) errors with too few non-splat type arguments (2) - uses splat restriction with concrete type uses splat restriction with concrete type - overloads with type restriction and splat (6) overloads with type restriction and splat (6) - matches instantiated generic with splat in generic type matches instantiated generic with splat in generic type - splats splats - uses splat restriction, matches empty uses splat restriction, matches empty - matches with tuple splat inside explicit Union matches with tuple splat inside explicit Union - overloads with type restriction and splat (5) overloads with type restriction and splat (5) - errors if splatting non-tuple type in return values errors if splatting non-tuple type in return values - uses splat restriction after non-splat arguments (#5037) uses splat restriction after non-splat arguments (#5037) - says missing argument because positional args don't match past splat says missing argument because positional args don't match past splat - doesn't match splat in generic type with unsplatted tuple (#10164) doesn't match splat in generic type with unsplatted tuple (#10164) - matches with splat matches with splat - errors if splatting union errors if splatting union - works if matches splat with type restriction works if matches splat with type restriction - method with default arguments and splat matches call with one arg (#2766) method with default arguments and splat matches call with one arg (#2766) - redefines method with splat (bug #248) redefines method with splat (bug #248) - says no overload matches on type restrictions past the splat arg says no overload matches on type restrictions past the splat arg - errors if doesn't match splat with type restriction errors if doesn't match splat with type restriction - errors on zero args with named arg and splat errors on zero args with named arg and splat - overloads with type restriction and splat (7) overloads with type restriction and splat (7) - matches with type var splat inside explicit Union matches with type var splat inside explicit Union - method with splat and optional named argument matches zero args call (#2746) method with splat and optional named argument matches zero args call (#2746) - splats arg and splat against splat (1) (#1042) splats arg and splat against splat (1) (#1042) - can splat after type filter left it as a tuple (#442) can splat after type filter left it as a tuple (#442) - overloads with splat against method with two arguments (#986) (2) overloads with splat against method with two arguments (#986) (2) - overloads with splat against method with two arguments (#986) (1) overloads with splat against method with two arguments (#986) (1) - errors with too few non-splat type arguments (1) errors with too few non-splat type arguments (1) - matches with type var and splat of itself inside explicit Union matches with type var and splat of itself inside explicit Union - splats arg and splat against splat (2) (#1042) splats arg and splat against splat (2) (#1042) - matches with type var splat inside explicit Union, when all splat elements match matches with type var splat inside explicit Union, when all splat elements match - matches with type var splat inside explicit Union (2) matches with type var splat inside explicit Union (2) - Crystal::Splat - without splat without splat - with splat with splat - doesn't match free var type splats inside explicit Union doesn't match free var type splats inside explicit Union - gives correct error when forwarding splat (2) gives correct error when forwarding splat (2) - overloads with type restriction and splat (3) overloads with type restriction and splat (3) - errors if doesn't match splat with type restriction because of zero arguments errors if doesn't match splat with type restriction because of zero arguments - overloads with type restriction and splat (4) overloads with type restriction and splat (4) - errors if splatting non-tuple type in call arguments errors if splatting non-tuple type in call arguments - accesses T when empty, via module accesses T when empty, via module - matches type splat with splat in generic type (2) matches type splat with splat in generic type (2) - gives correct error when forwarding splat gives correct error when forwarding splat - matches partially instantiated generic with splat in generic type matches partially instantiated generic with splat in generic type - uses splat restriction uses splat restriction - errors if using two splat indices on restriction errors if using two splat indices on restriction - uses bare *, doesn't let more args uses bare *, doesn't let more args - forwards tuple with an extra argument forwards tuple with an extra argument - overloads with type restriction and splat (1) overloads with type restriction and splat (1) - overloads with type restriction and splat (2) overloads with type restriction and splat (2) - matches type splat with splat in generic type (1) matches type splat with splat in generic type (1) - matches with type var splat inside explicit Union, when non-splat vars fail matches with type var splat inside explicit Union, when non-splat vars fail - doesn't shift a call's location doesn't shift a call's location - allows default value after splat index allows default value after splat index - matches with type var and splat of itself inside explicit Union (2) matches with type var and splat of itself inside explicit Union (2) - matches with type var splat inside explicit Union, when one splat fails entirely matches with type var splat inside explicit Union, when one splat fails entirely -Semantic: type - errors if original type doesn't support instance variables errors if original type doesn't support instance variables - can call methods of original type can call methods of original type - can access instance variables of original type can access instance variables of original type - can call methods of parent type can call methods of parent type -Semantic: fun - errors if defining class inside fun through macro (#6874) errors if defining class inside fun through macro (#6874) -Semantic: virtual metaclass - allows passing metaclass to virtual metaclass restriction allows passing metaclass to virtual metaclass restriction - yields virtual type in block arg if class is abstract yields virtual type in block arg if class is abstract - types virtual metaclass method types virtual metaclass method - allows passing metaclass to virtual metaclass restriction allows passing metaclass to virtual metaclass restriction - allows allocating virtual type when base class is abstract allows allocating virtual type when base class is abstract - types virtual metaclass types virtual metaclass - merges metaclass types merges metaclass types - restricts virtual metaclass to Class (#11376) restricts virtual metaclass to Class (#11376) - types metaclass node types metaclass node - merges metaclass types with 3 types merges metaclass types with 3 types -Normalize: unless - normalizes unless normalizes unless -Code gen: macro - stringifies type without virtual marker stringifies type without virtual marker - determines if method exists (false) determines if method exists (false) - expands def macro with var expands def macro with var - initializes class var in macro initializes class var in macro - expands macro with default arg and splat (3) (#784) expands macro with default arg and splat (3) (#784) - expands macro that yields expands macro that yields - correctly recomputes call (bug) correctly recomputes call (bug) - expands macro with op assign inside assign (#5568) expands macro with op assign inside assign (#5568) expands macro with op assign inside assign (#5568) expands macro with op assign inside assign (#5568) expands macro with op assign inside assign (#5568) expands macro with op assign inside assign (#5568) expands macro with op assign inside assign (#5568) expands macro with op assign inside assign (#5568) expands macro with op assign inside assign (#5568) expands macro with op assign inside assign (#5568) - types macro expansion bug (#1734) types macro expansion bug (#1734) - transforms hooks (bug) transforms hooks (bug) - says that enum doesn't have Flags annotation says that enum doesn't have Flags annotation - forwards dir location forwards dir location - runs macro with splat runs macro with splat - fixes empty types of macro expansions (#1379) fixes empty types of macro expansions (#1379) - expands def macro with @type.instance_vars with virtual expands def macro with @type.instance_vars with virtual - expands def macro with @type.name with virtual (2) expands def macro with @type.name with virtual (2) - can refer to abstract (1) can refer to abstract (1) - expands macro defined in base class expands macro defined in base class - expands macro with default arg and splat (#784) expands macro with default arg and splat (#784) - determines if variable has default value determines if variable has default value - gets correct class name when there are classes in the middle gets correct class name when there are classes in the middle - expands def macro with @type.name expands def macro with @type.name - uses invocation context uses invocation context - uses tuple T in method with free vars uses tuple T in method with free vars - doesn't replace %q() (#2178) doesn't replace %q() (#2178) - expands macro and resolves type correctly expands macro and resolves type correctly - can access type variables of a module can access type variables of a module - devirtualizes @type devirtualizes @type - gets default value of instance variable gets default value of instance variable - can refer to union (1) can refer to union (1) - doesn't skip abstract classes when defining macro methods doesn't skip abstract classes when defining macro methods - can access type variables that are not types can access type variables that are not types - replaces %s inside string inside interpolation (#2178) replaces %s inside string inside interpolation (#2178) replaces %s inside string inside interpolation (#2178) replaces %s inside string inside interpolation (#2178) replaces %s inside string inside interpolation (#2178) replaces %s inside string inside interpolation (#2178) replaces %s inside string inside interpolation (#2178) replaces %s inside string inside interpolation (#2178) replaces %s inside string inside interpolation (#2178) replaces %s inside string inside interpolation (#2178) - codegens macro def with default arg (similar to #496) codegens macro def with default arg (similar to #496) - can use macro inside array literal can use macro inside array literal can use macro inside array literal can use macro inside array literal can use macro inside array literal can use macro inside array literal can use macro inside array literal can use macro inside array literal can use macro inside array literal can use macro inside array literal - expands macro expands macro - expands inline macro for expands inline macro for - resolves alias in macro resolves alias in macro - keeps heredoc contents with interpolation inside macro keeps heredoc contents with interpolation inside macro keeps heredoc contents with interpolation inside macro keeps heredoc contents with interpolation inside macro keeps heredoc contents with interpolation inside macro keeps heredoc contents with interpolation inside macro keeps heredoc contents with interpolation inside macro keeps heredoc contents with interpolation inside macro keeps heredoc contents with interpolation inside macro keeps heredoc contents with interpolation inside macro - doesn't override local variable when using macro variable doesn't override local variable when using macro variable - can refer to abstract (2) can refer to abstract (2) - executes with named arguments for positional arg (2) executes with named arguments for positional arg (2) - gets default value of instance variable of generic type gets default value of instance variable of generic type gets default value of instance variable of generic type gets default value of instance variable of generic type gets default value of instance variable of generic type gets default value of instance variable of generic type gets default value of instance variable of generic type gets default value of instance variable of generic type gets default value of instance variable of generic type gets default value of instance variable of generic type - can refer to @type can refer to @type - expands macro defined in class expands macro defined in class - can iterate union types can iterate union types - executes with named arguments executes with named arguments - retains original yield expression (#2923) retains original yield expression (#2923) - expands def macro with @type.instance_vars expands def macro with @type.instance_vars - can access type variables of a tuple can access type variables of a tuple - expands @type.name in virtual metaclass (1) expands @type.name in virtual metaclass (1) - uses indexed macro variable with many keys uses indexed macro variable with many keys - determines if overrides (false) determines if overrides (false) - access to the program with @top_level access to the program with @top_level - does block unpacking inside macro expression (#13707) does block unpacking inside macro expression (#13707) - expands def macro expands def macro - expands macro with default arg and splat (2) (#784) expands macro with default arg and splat (2) (#784) - expands macro def with return (#1040) expands macro def with return (#1040) - executes with named arguments for positional arg (1) executes with named arguments for positional arg (1) - doesn't reuse macro nodes (bug) doesn't reuse macro nodes (bug) - passes #826 passes #826 - can access type variables of a generic type can access type variables of a generic type - determines if method exists (true) determines if method exists (true) - forwards file location forwards file location - declares constant in macro (#838) declares constant in macro (#838) - codegens macro def with splat (#496) codegens macro def with splat (#496) - expands inline macro expands inline macro - forwards line number forwards line number - surrounds {{yield}} with begin/end surrounds {{yield}} with begin/end - executes subclasses executes subclasses - can access type variables can access type variables - receives &block receives &block - codegens macro with comment (bug) (#1396) codegens macro with comment (bug) (#1396) - recalculates method when virtual metaclass type is added recalculates method when virtual metaclass type is added recalculates method when virtual metaclass type is added recalculates method when virtual metaclass type is added recalculates method when virtual metaclass type is added recalculates method when virtual metaclass type is added recalculates method when virtual metaclass type is added recalculates method when virtual metaclass type is added recalculates method when virtual metaclass type is added recalculates method when virtual metaclass type is added - executes all_subclasses executes all_subclasses - finds macro in class finds macro in class - can use macro inside hash literal can use macro inside hash literal can use macro inside hash literal can use macro inside hash literal can use macro inside hash literal can use macro inside hash literal can use macro inside hash literal can use macro inside hash literal can use macro inside hash literal can use macro inside hash literal - expands macro with escaped quotes (#895) expands macro with escaped quotes (#895) - checks if macro expansion returns (#821) checks if macro expansion returns (#821) - gets enum members as constants gets enum members as constants - finds macro from virtual type finds macro from virtual type - expands inline macro if (true) expands inline macro if (true) - allows overriding macro definition when redefining base class allows overriding macro definition when redefining base class - uses indexed macro variable uses indexed macro variable - correctly resolves constant inside block in macro def correctly resolves constant inside block in macro def - keeps line number with no block keeps line number with no block - can refer to types can refer to types - expands macro as class method and accesses @type expands macro as class method and accesses @type - keeps heredoc contents inside macro keeps heredoc contents inside macro - replaces %s inside string inside interpolation, with braces (#2178) replaces %s inside string inside interpolation, with braces (#2178) replaces %s inside string inside interpolation, with braces (#2178) replaces %s inside string inside interpolation, with braces (#2178) replaces %s inside string inside interpolation, with braces (#2178) replaces %s inside string inside interpolation, with braces (#2178) replaces %s inside string inside interpolation, with braces (#2178) replaces %s inside string inside interpolation, with braces (#2178) replaces %s inside string inside interpolation, with braces (#2178) replaces %s inside string inside interpolation, with braces (#2178) - executes with named arguments for positional arg (3) executes with named arguments for positional arg (3) - accepts compile-time flags accepts compile-time flags - expands @type.name in virtual metaclass (2) expands @type.name in virtual metaclass (2) - errors if dynamic constant assignment after macro expansion errors if dynamic constant assignment after macro expansion - keeps line number with a block keeps line number with a block - runs macro with arg and splat runs macro with arg and splat - expands @def in macro expands @def in macro - doesn't override local variable when using macro variable (2) doesn't override local variable when using macro variable (2) - responds correctly to has_constant? with @top_level responds correctly to has_constant? with @top_level - expands def macro with @type.name with virtual expands def macro with @type.name with virtual - implicitly marks method as macro def when using @type implicitly marks method as macro def when using @type - can use constants can use constants - determines if overrides, through another class (true) determines if overrides, through another class (true) - expands def macro with @type.instance_vars with subclass expands def macro with @type.instance_vars with subclass - gets default value of instance variable of inherited type that also includes module gets default value of instance variable of inherited type that also includes module - expands Path with resolve method expands Path with resolve method - says that enum has Flags annotation says that enum has Flags annotation - determines if overrides, with macro method (false) determines if overrides, with macro method (false) - gets constant gets constant - determines if overrides (true) determines if overrides (true) - copies base macro def to sub-subtype even after it was copied to a subtype (#448) copies base macro def to sub-subtype even after it was copied to a subtype (#448) - expands macro as class method expands macro as class method - expands @def in inline macro expands @def in inline macro - expands def macro with instance var and method call (bug) expands def macro with instance var and method call (bug) - allows macro with default arguments allows macro with default arguments - initializes instance var in macro initializes instance var in macro - gets methods gets methods - gets enum members with @type.constants gets enum members with @type.constants - determines if overrides, through module (true) determines if overrides, through module (true) - expands inline macro if (false) expands inline macro if (false) - doesn't replace %s in string (#2178) doesn't replace %s in string (#2178) - expands macro that invokes another macro expands macro that invokes another macro - can refer to union (2) can refer to union (2) - expands macro with arguments expands macro with arguments - can access free variables can access free variables -Crystal::Repl::Interpreter - bugs - doesn't override local variable value with block var with the same name doesn't override local variable value with block var with the same name - doesn't incorrectly consider a non-closure as closure doesn't incorrectly consider a non-closure as closure - breaks from current block, not from outer block breaks from current block, not from outer block - does leading zeros does leading zeros - does multidispatch on virtual struct union nil does multidispatch on virtual struct union nil - does multidispatch on virtual struct does multidispatch on virtual struct - doesn't pass self to top-level method doesn't pass self to top-level method - doesn't pass self to top-level method (FileNode) doesn't pass self to top-level method (FileNode) - correctly puts virtual metaclass type in union correctly puts virtual metaclass type in union -Normalize: proc pointer - normalizes proc pointer of global call normalizes proc pointer of global call - normalizes proc pointer with ivar receiver normalizes proc pointer with ivar receiver - normalizes proc pointer with cvar receiver normalizes proc pointer with cvar receiver - normalizes proc pointer without object normalizes proc pointer without object - normalizes proc pointer with variable receiver normalizes proc pointer with variable receiver - normalizes proc pointer with global const receiver normalizes proc pointer with global const receiver - normalizes proc pointer with const receiver normalizes proc pointer with const receiver - normalizes proc pointer with parameters, without object normalizes proc pointer with parameters, without object -Code gen: c enum - codegens enum with 1 &+ 2 codegens enum with 1 &+ 2 - codegens enum with 3 &- 2 codegens enum with 3 &- 2 - codegens enum with 3 - 2 codegens enum with 3 - 2 - codegens enum value 2 codegens enum value 2 - codegens enum value 3 codegens enum value 3 - codegens enum with ~1 codegens enum with ~1 - codegens enum with 100 >> 3 codegens enum with 100 >> 3 - codegens enum with 10 ^ 3 codegens enum with 10 ^ 3 - codegens enum with 10 // 2 codegens enum with 10 // 2 - codegens enum value codegens enum value - codegens enum with 1 << 3 codegens enum with 1 << 3 - codegens enum that refers to another enum constant codegens enum that refers to another enum constant - codegens enum with 10 | 3 codegens enum with 10 | 3 - codegens enum value 4 codegens enum value 4 - codegens enum with +1 codegens enum with +1 - codegens enum with 3 * 2 codegens enum with 3 * 2 - codegens enum with (1 + 2) * 3 codegens enum with (1 + 2) * 3 - codegens enum that refers to another constant codegens enum that refers to another constant - codegens enum with 3 &* 2 codegens enum with 3 &* 2 - codegens enum with 1 + 2 codegens enum with 1 + 2 - codegens enum with 10 & 3 codegens enum with 10 & 3 - codegens enum with -1 codegens enum with -1 - codegens enum with 10 % 3 codegens enum with 10 % 3 -Semantic: is_a? - does is_a? from virtual metaclass to generic metaclass (#12302) does is_a? from virtual metaclass to generic metaclass (#12302) - is bool is bool - restricts in assignment restricts in assignment - restricts type in else but lazily restricts type in else but lazily - restricts type inside if scope 2 restricts type inside if scope 2 - checks simple type with union checks simple type with union - restricts other types inside if else restricts other types inside if else - types if is_a? preceded by return if (preserves nops) types if is_a? preceded by return if (preserves nops) - restricts type inside if else when used with module type restricts type inside if else when used with module type - restricts type inside if scope 1 restricts type inside if scope 1 - applies filter inside block applies filter inside block - checks union with union checks union with union - doesn't fail on untyped is_a (#10317) doesn't fail on untyped is_a (#10317) - applies negative condition filter if then is no return applies negative condition filter if then is no return - restricts type inside if scope 3 restricts type inside if scope 3 -Code gen: union type - codegens union type when no obj and restrictions codegens union type when no obj and restrictions - assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 assigns union to larger union when source is nilable 2 - codegens union type when obj is not union but arg is codegens union type when obj is not union but arg is - provides T as a tuple literal provides T as a tuple literal - sorts restrictions when there are unions sorts restrictions when there are unions - codegens union type for instance var codegens union type for instance var - assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union assigns union to larger union - codegens if with same nested union codegens if with same nested union - assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 assigns union to larger union when source is nilable 1 - codegens union type when obj is union and no args codegens union type when obj is union and no args - respects union payload alignment when upcasting Bool (#14898) respects union payload alignment when upcasting Bool (#14898) - dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable dispatch call to object method on nilable - codegens union type when no obj codegens union type when no obj - codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s codegens union to_s - codegens union type when obj is union and arg is union codegens union type when obj is union and arg is union - codegens union type when obj union but arg is not codegens union type when obj union but arg is not - assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union assigns union to union - codegens union type as return value codegens union type as return value -Semantic: yield with scope - infer type of block body with yield scope infer type of block body with yield scope - uses instance variable of enclosing scope uses instance variable of enclosing scope - uses method of enclosing scope uses method of enclosing scope - infer type of block body infer type of block body - infer type of block body with yield scope and arguments infer type of block body with yield scope and arguments - infer type of empty block body infer type of empty block body - mentions with yield scope and current scope in error mentions with yield scope and current scope in error - invokes nested calls invokes nested calls - errors if using instance variable at top level errors if using instance variable at top level - finds macro finds macro - passes #229 passes #229 -Semantic: c enum - types enum value with base type types enum value with base type - allows using an enum as a type in a struct allows using an enum as a type in a struct - allows using an enum as a type in a fun allows using an enum as a type in a fun - errors if enum base type is not an integer errors if enum base type is not an integer - types enum value types enum value - errors if enum value is different from default (Int32) (#194) errors if enum value is different from default (Int32) (#194) -Semantic: ssa - types while with next types while with next - types a var inside an if without previous definition types a var inside an if without previous definition - types if with return in then with assign types if with return in then with assign - types if with break in then types if with break in then - types if with next in then types if with next in then - types if with restricted type in then types if with restricted type in then - types block with next types block with next - types a var that is re-assigned in a while in next and used in condition types a var that is re-assigned in a while in next and used in condition - types a var inside an if without change in then types a var inside an if without change in then - types a var inside an if without change in else types a var inside an if without change in else - types while with break doesn't infect initial vars types while with break doesn't infect initial vars - types a var that is declared in a while condition with break before re-assignment types a var that is declared in a while condition with break before re-assignment - types a var that is declared in a while types a var that is declared in a while - types while with break types while with break - types if with restricted type in else types if with restricted type in else - types a var that is re-assigned in a while and used in condition types a var that is re-assigned in a while and used in condition - types if with return in else with assign types if with return in else with assign - types re-assign inside while (bug) types re-assign inside while (bug) - types a var with an if with nested if types a var with an if with nested if - types a var after begin ensure as having last type (2) types a var after begin ensure as having last type (2) - types a var that is re-assigned in a while types a var that is re-assigned in a while - types block with break doesn't infect initial vars types block with break doesn't infect initial vars - types a var that is re-assigned in a block types a var that is re-assigned in a block - types if with unreachable in then types if with unreachable in then - types if with return in else types if with return in else - types a var inside an if without definition in then types a var inside an if without definition in then - preserves type filters after block (bug) preserves type filters after block (bug) - types a var inside an if with previous definition types a var inside an if with previous definition - types a var with an if but without change types a var with an if but without change - types if with return in both branches types if with return in both branches - doesn't change type to nilable inside if doesn't change type to nilable inside if - types a var that is declared in a while condition types a var that is declared in a while condition - types a redefined variable types a redefined variable - types re-assign inside if (bug) types re-assign inside if (bug) - types a var that is re-assigned in a while condition types a var that is re-assigned in a while condition - types a var that is declared in a while with out types a var that is declared in a while with out - types while with break with new var types while with break with new var - types block with break types block with break - types if/else with var (bug) types if/else with var (bug) - doesn't error if same variable is declared in multiple typeofs doesn't error if same variable is declared in multiple typeofs - errors if accessing variable declared inside typeof errors if accessing variable declared inside typeof - types a var after begin ensure as having last type types a var after begin ensure as having last type - doesn't error if same variable is used in multiple arguments of same typeof doesn't error if same variable is used in multiple arguments of same typeof - types a var that is declared in a while condition with break after re-assignment types a var that is declared in a while condition with break after re-assignment - types if with return in then types if with return in then - types a var inside an if without definition in else types a var inside an if without definition in else -Code gen: tuple - downcasts union inside tuple to value (#3907) downcasts union inside tuple to value (#3907) - codegens tuple [0..2]? codegens tuple [0..2]? - upcasts tuple inside union to union with compatible tuple upcasts tuple inside union to union with compatible tuple - passes empty tuple and empty named tuple to a method (#2852) passes empty tuple and empty named tuple to a method (#2852) - codegens tuple metaclass [1..0] codegens tuple metaclass [1..0] - downcasts union to mixed tuple type downcasts union to mixed tuple type - codegens tuple [0..1] codegens tuple [0..1] - codegens union of tuple of float with tuple of tuple of float codegens union of tuple of float with tuple of tuple of float - codegens tuple class codegens tuple class - codegens tuple [0]? codegens tuple [0]? - upcasts tuple union to compatible tuple upcasts tuple union to compatible tuple - codegens tuple [0..0] codegens tuple [0..0] - allows malloc pointer of tuple allows malloc pointer of tuple - codegens tuple metaclass [0..0] codegens tuple metaclass [0..0] - assigns tuple inside union to union with compatible tuple assigns tuple inside union to union with compatible tuple - downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types downcasts union to mixed union with mixed tuple types - codegens tuple [1..0] codegens tuple [1..0] - codegens tuple [1..1] codegens tuple [1..1] - assigns two same-size tuple types to a same var (#3132) assigns two same-size tuple types to a same var (#3132) - assigns tuple union to compatible tuple assigns tuple union to compatible tuple - codegens tuple metaclass [2]? codegens tuple metaclass [2]? - merges two tuple types of same size (2) merges two tuple types of same size (2) - codegens tuple [0..2] codegens tuple [0..2] - codegens tuple metaclass [1] codegens tuple metaclass [1] - codegens tuple metaclass [0] codegens tuple metaclass [0] - provides T as a tuple literal provides T as a tuple literal - codegens tuple [2..2] codegens tuple [2..2] - codegens tuple [2..2]? codegens tuple [2..2]? - accesses T and creates instance from it accesses T and creates instance from it - codegens tuple [0] codegens tuple [0] - allows tuple covariance allows tuple covariance - codegens tuple [2]? codegens tuple [2]? - codegens tuple metaclass [3..2]? codegens tuple metaclass [3..2]? - codegens tuple metaclass [0..1] codegens tuple metaclass [0..1] - codegens tuple [0..1]? codegens tuple [0..1]? - assigns tuple to compatible tuple assigns tuple to compatible tuple - merges two tuple types of same size (1) merges two tuple types of same size (1) - codegens tuple [0..0]? codegens tuple [0..0]? - gets size at compile time gets size at compile time - codegens tuple [1] (2) codegens tuple [1] (2) - codegens tuple [3..2]? codegens tuple [3..2]? - codegens tuple [1]? codegens tuple [1]? - passed tuple to def passed tuple to def - upcasts tuple inside compatible tuple upcasts tuple inside compatible tuple - codegens splats inside tuples codegens splats inside tuples - codegens tuple [1] codegens tuple [1] - codegens tuple [1..0]? codegens tuple [1..0]? - codegens tuple [1..1]? codegens tuple [1..1]? - codegens tuple [-3..2]? codegens tuple [-3..2]? - codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) codegens tuple union (bug because union size was computed incorrectly) -Crystal::Repl::Interpreter - class vars - finds self in class var initializer (#12439) finds self in class var initializer (#12439) - interprets class var for virtual metaclass type interprets class var for virtual metaclass type - reads class var initializer with union (#12633) reads class var initializer with union (#12633) - interprets class var for virtual type interprets class var for virtual type - interprets class var with initializer interprets class var with initializer - does class var initializer with union (#12633) does class var initializer with union (#12633) - interprets class var without initializer interprets class var without initializer -Semantic: const - errors if using const in var declaration errors if using const in var declaration - doesn't errors if constant depends on another one defined later through method, but constant is simple ('a') doesn't errors if constant depends on another one defined later through method, but constant is simple ('a') - types a nested constant types a nested constant - errors if using const in proc notation parameter type errors if using const in proc notation parameter type - doesn't errors if constant depends on another one defined later through method, but constant is simple (~ 2) doesn't errors if constant depends on another one defined later through method, but constant is simple (~ 2) - types a constant types a constant - errors if using const in proc notation return type errors if using const in proc notation return type - finds current type only for first path item (2) finds current type only for first path item (2) - errors if can't infer constant type (#3240, #3948) errors if can't infer constant type (#3240, #3948) - doesn't errors if constant depends on another one defined later through method, but constant is simple (1) doesn't errors if constant depends on another one defined later through method, but constant is simple (1) - doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED - 1) doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED - 1) - doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED &* 2) doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED &* 2) - finds current type only for first path item (1) finds current type only for first path item (1) - errors if constant has NoReturn type (#6139) errors if constant has NoReturn type (#6139) - doesn't errors if constant depends on another one defined later through method, but constant is simple (true) doesn't errors if constant depends on another one defined later through method, but constant is simple (true) - types a constant reference types a constant reference - doesn't errors if constant depends on another one defined later through method, but constant is simple (1 &+ ZED) doesn't errors if constant depends on another one defined later through method, but constant is simple (1 &+ ZED) - errors if using const in restriction errors if using const in restriction - keeps type of container when using Path keeps type of container when using Path - types a nested constant using Path types a nested constant using Path - doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED * 2) doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED * 2) - errors if using return inside constant value (#5391) errors if using return inside constant value (#5391) - errors if using const in uninitialized errors if using const in uninitialized - errors if using constant as generic type (#3240) errors if using constant as generic type (#3240) - doesn't crash with const used in initialize (bug) doesn't crash with const used in initialize (bug) - can use constant defined later (#2906) can use constant defined later (#2906) - finds constant in module that includes module (#205) finds constant in module that includes module (#205) - doesn't count parent types as current type doesn't count parent types as current type - finds nearest constant first finds nearest constant first - doesn't errors if constant depends on another one defined later through method, but constant is simple (+ 1) doesn't errors if constant depends on another one defined later through method, but constant is simple (+ 1) - errors if using const in type declaration errors if using const in type declaration - finds current type first finds current type first - doesn't share variables with global scope doesn't share variables with global scope - finds constant in class that extends class (#205) finds constant in class that extends class (#205) - doesn't errors if constant depends on another one defined later through method, but constant is simple (- 2) doesn't errors if constant depends on another one defined later through method, but constant is simple (- 2) - doesn't errors if constant depends on another one defined later through method, but constant is simple ("foo") doesn't errors if constant depends on another one defined later through method, but constant is simple ("foo") - types a nested type with same name types a nested type with same name - errors on dynamic constant assignment inside block errors on dynamic constant assignment inside block - doesn't errors if constant depends on another one defined later through method, but constant is simple (1 + ZED) doesn't errors if constant depends on another one defined later through method, but constant is simple (1 + ZED) - errors on dynamic constant assignment inside if errors on dynamic constant assignment inside if - types a constant inside a def types a constant inside a def - finds const from restriction finds const from restriction - creates container module if not exist when using Path creates container module if not exist when using Path - types a global constant reference in method types a global constant reference in method - doesn't error if using c enum doesn't error if using c enum - doesn't errors if constant depends on another one defined later through method, but constant is simple (1 + 2) doesn't errors if constant depends on another one defined later through method, but constant is simple (1 + 2) - finds current type before parents (#4086) finds current type before parents (#4086) - types a constant using Path types a constant using Path - doesn't errors if constant depends on another one defined later through method, but constant is simple (nil) doesn't errors if constant depends on another one defined later through method, but constant is simple (nil) - doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED // 2) doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED // 2) - doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED &- 1) doesn't errors if constant depends on another one defined later through method, but constant is simple (ZED &- 1) - types a global constant reference in static method types a global constant reference in static method -Semantic: pointer - types pointer of constant types pointer of constant - types Pointer.malloc types Pointer.malloc - detects recursive pointerof expansion (4) detects recursive pointerof expansion (4) - pointer malloc creates new type pointer malloc creates new type - types pointer value on typedef types pointer value on typedef - types realloc types realloc - can pass any pointer to something expecting void* in lib call can pass any pointer to something expecting void* in lib call - detects recursive pointerof expansion (3) detects recursive pointerof expansion (3) - types pointer value types pointer value - can assign nil to void pointer can assign nil to void pointer - errors with non-matching generic value with value= (#10211) errors with non-matching generic value with value= (#10211) - pointer of class raises error pointer of class raises error - takes pointerof lib external var takes pointerof lib external var - type pointer casting of object type type pointer casting of object type - errors if doing Pointer.allocate errors if doing Pointer.allocate - types pointer diff types pointer diff - type pointer casting type pointer casting - pointer of value error pointer of value error - detects recursive pointerof expansion (2) (#1654) detects recursive pointerof expansion (2) (#1654) - errors with non-matching generic value with value=, generic type (#10211) errors with non-matching generic value with value=, generic type (#10211) - types pointer add types pointer add - doesn't crash if pointerof expansion type has generic splat parameter (#11808) doesn't crash if pointerof expansion type has generic splat parameter (#11808) - detects recursive pointerof expansion (#551) (#553) detects recursive pointerof expansion (#551) (#553) - errors with non-matching generic value with value=, union of generic types (#10544) errors with non-matching generic value with value=, union of generic types (#10544) - can assign pointerof virtual type (#8216) can assign pointerof virtual type (#8216) - allows using pointer with subclass allows using pointer with subclass - create pointer by address create pointer by address - pointer of class raises error pointer of class raises error - can pass any pointer to something expecting void* in lib call, with to_unsafe can pass any pointer to something expecting void* in lib call, with to_unsafe - can't do Pointer.malloc without type var can't do Pointer.malloc without type var - says undefined variable (#7556) says undefined variable (#7556) - does not recalculate element type on multiple calls to `#value=` (#15742) does not recalculate element type on multiple calls to `#value=` (#15742) - types int pointer types int pointer -Lexer: location - assigns correct loc location to node assigns correct loc location to node - overrides location with pragma overrides location with pragma - pushes and pops its location pushes and pops its location - Location.parse - raises ArgumentError if line number is invalid raises ArgumentError if line number is invalid - raises ArgumentError if missing part raises ArgumentError if missing part - raises ArgumentError if missing colon raises ArgumentError if missing colon - raises ArgumentError if column number is invalid raises ArgumentError if column number is invalid - parses location from string parses location from string - locations in different files have no order locations in different files have no order - locations with virtual files should be comparable locations with virtual files should be comparable - parses var/call right after loc (#491) parses var/call right after loc (#491) - locations in same files are comparable based on line locations in same files are comparable based on line - stores column numbers stores column numbers - stores line numbers stores line numbers - uses two consecutive loc pragma uses two consecutive loc pragma -Semantic: yield with scope - doesn't explode if specifying &block but never using it (#181) doesn't explode if specifying &block but never using it (#181) - uses instance variable of enclosing scope uses instance variable of enclosing scope - uses method of with object uses method of with object - uses method of enclosing scope uses method of enclosing scope - uses scope in instance method uses scope in instance method uses scope in instance method uses scope in instance method uses scope in instance method uses scope in instance method uses scope in instance method uses scope in instance method uses scope in instance method uses scope in instance method - uses scope in global method uses scope in global method uses scope in global method uses scope in global method uses scope in global method uses scope in global method uses scope in global method uses scope in global method uses scope in global method uses scope in global method - it uses self for instance method it uses self for instance method it uses self for instance method it uses self for instance method it uses self for instance method it uses self for instance method it uses self for instance method it uses self for instance method it uses self for instance method it uses self for instance method - yields with dispatch (#2171) (1) yields with dispatch (#2171) (1) - it invokes global method inside block of yield scope it invokes global method inside block of yield scope it invokes global method inside block of yield scope it invokes global method inside block of yield scope it invokes global method inside block of yield scope it invokes global method inside block of yield scope it invokes global method inside block of yield scope it invokes global method inside block of yield scope it invokes global method inside block of yield scope it invokes global method inside block of yield scope - generate right code when yielding struct as scope generate right code when yielding struct as scope - yields virtual type (#2171) (2) yields virtual type (#2171) (2) -Semantic: nilable instance var - says instance var was not initialized in all of the initialize methods (2) says instance var was not initialized in all of the initialize methods (2) - says self was used before instance var was initialized says self was used before instance var was initialized - says instance var was not initialized in all of the initialize methods, with var declaration says instance var was not initialized in all of the initialize methods, with var declaration - finds type that doesn't initialize instance var (#1222) finds type that doesn't initialize instance var (#1222) - doesn't consider as nil if initialized with catch-all doesn't consider as nil if initialized with catch-all - says instance var was used before initialized (2) says instance var was used before initialized (2) - says self was used before instance var was initialized (2) says self was used before instance var was initialized (2) - marks instance var as nilable if assigned inside captured block (#1696) marks instance var as nilable if assigned inside captured block (#1696) - marks instance var as nilable if assigned inside proc literal marks instance var as nilable if assigned inside proc literal - says instance var was used before initialized says instance var was used before initialized - says self was used before instance var was initialized (3) says self was used before instance var was initialized (3) - says instance var was not initialized in all of the initialize methods says instance var was not initialized in all of the initialize methods -Normalize: block - normalizes unpacking with splat normalizes unpacking with splat - normalizes unpacking with single expression body normalizes unpacking with single expression body - normalizes multiple nested unpackings normalizes multiple nested unpackings - normalizes unpacking with empty body normalizes unpacking with empty body - normalizes nested unpacking normalizes nested unpacking - normalizes unpacking with underscore normalizes unpacking with underscore - normalizes unpacking with multiple body expressions normalizes unpacking with multiple body expressions -types to_s of - nilable reference type nilable reference type - does for type contained in generic module does for type contained in generic module - union of simple types union of simple types - does for type contained in generic class does for type contained in generic class - non-instantiated array non-instantiated array - named tuple named tuple - union types - should not have extra parens - in tuples in tuples - in arrays in arrays - in pointers in pointers - should have parens - as return type as return type - as arg type as arg type - nilable type with more than two elements, Nil at the end nilable type with more than two elements, Nil at the end - array of simple types array of simple types - nilable value type nilable value type -context - use type filters from is_a? use type filters from is_a? - can handle union types can handle union types - can get context of empty def can get context of empty def - can get context of yielded block can get context of yielded block - does includes args, instance vars, local variables and expressions on instance methods does includes args, instance vars, local variables and expressions on instance methods - includes last call includes last call - can get context in generic class can get context in generic class - includes assignments includes assignments - can display text output can display text output - can get context in contained class' class method can get context in contained class' class method - does includes self on classes does includes self on classes - can get context in file private method can get context in file private method - does includes regex special variables does includes regex special variables - includes block args includes block args - can get context of nested yielded block can get context of nested yielded block - can get context inside initialize can get context inside initialize - can display json output can display json output - use type filters from if var use type filters from if var - includes args includes args - can't get context from uncalled method can't get context from uncalled method - can get context inside class methods can get context inside class methods - does not includes temp variables does not includes temp variables - can get context inside a module can get context inside a module - can get context in file private module can get context in file private module - consider different instances of def consider different instances of def - includes top level vars includes top level vars - can get context of empty yielded block can get context of empty yielded block -Crystal::ABI::ARM - align - for pointer for pointer - for struct for struct - for array for array - for packed struct for packed struct - for double for double - for float for float - for integer for integer - abi_info - does with structs less than 64 bits does with structs less than 64 bits - does with primitives does with primitives - does with structs between 64 and 128 bits does with structs between 64 and 128 bits - does with structs between 64 and 128 bits does with structs between 64 and 128 bits - size - for float for float - for integer for integer - for double for double - for struct for struct - for pointer for pointer - for array for array - for packed struct for packed struct -Code gen: case - does case when with metaclass does case when with metaclass - codegens case with else codegens case with else codegens case with else codegens case with else codegens case with else codegens case with else codegens case with else codegens case with else codegens case with else codegens case with else - codegens case with one condition codegens case with one condition codegens case with one condition codegens case with one condition codegens case with one condition codegens case with one condition codegens case with one condition codegens case with one condition codegens case with one condition codegens case with one condition - codegens case when cond is a call codegens case when cond is a call codegens case when cond is a call codegens case when cond is a call codegens case when cond is a call codegens case when cond is a call codegens case when cond is a call codegens case when cond is a call codegens case when cond is a call codegens case when cond is a call - codegens case that always returns codegens case that always returns codegens case that always returns codegens case that always returns codegens case that always returns codegens case that always returns codegens case that always returns codegens case that always returns codegens case that always returns codegens case that always returns - codegens case with class codegens case with class - codegens value-less case codegens value-less case - codegens case without whens but else codegens case without whens but else codegens case without whens but else codegens case without whens but else codegens case without whens but else codegens case without whens but else codegens case without whens but else codegens case without whens but else codegens case without whens but else codegens case without whens but else - codegens case with two conditions codegens case with two conditions codegens case with two conditions codegens case with two conditions codegens case with two conditions codegens case with two conditions codegens case with two conditions codegens case with two conditions codegens case with two conditions codegens case with two conditions - codegens case when constant bug (#1028) codegens case when constant bug (#1028) -Semantic: closure - doesn't closure typeof local var doesn't closure typeof local var - is considered as closure if assigned once but comes from a method arg is considered as closure if assigned once but comes from a method arg - unifies types of closured var (1) unifies types of closured var (1) - marks variable as closured in def marks variable as closured in def - marks variable as closured inside block in fun marks variable as closured inside block in fun - gives error when doing yield inside proc literal gives error when doing yield inside proc literal - errors if forwarding block param doesn't match input type size errors if forwarding block param doesn't match input type size - considers var as closure-readonly if it was assigned multiple times before it was closured considers var as closure-readonly if it was assigned multiple times before it was closured - transforms block to proc literal with free var transforms block to proc literal with free var - marks outer fun inside a block as closured marks outer fun inside a block as closured - errors if sending closured proc pointer to C (2) errors if sending closured proc pointer to C (2) - gives error when doing yield inside proc literal gives error when doing yield inside proc literal - doesn't assign all types to metavar if closured but declared inside block and re-assigned inside the same context before the closure doesn't assign all types to metavar if closured but declared inside block and re-assigned inside the same context before the closure - correctly captures type of closured block arg correctly captures type of closured block arg - says can't send closure to C with new notation says can't send closure to C with new notation - does assign all types to metavar if closured but only assigned to once in a loop does assign all types to metavar if closured but only assigned to once in a loop - errors when transforming block to proc literal if type mismatch errors when transforming block to proc literal if type mismatch - correctly detects previous var as closured (#5609) correctly detects previous var as closured (#5609) - lookups return type in correct scope lookups return type in correct scope - marks variable as closured in program marks variable as closured in program - allows passing block as proc literal to new and to initialize allows passing block as proc literal to new and to initialize - can use fun typedef as block type can use fun typedef as block type - unifies types of closured var (2) unifies types of closured var (2) - transforms block to proc literal transforms block to proc literal - doesn't mark self var as closured, but marks method as self closured doesn't mark self var as closured, but marks method as self closured - errors if sending closured proc pointer to C (3) errors if sending closured proc pointer to C (3) - errors if forwarding block param doesn't match input type errors if forwarding block param doesn't match input type - doesn't assign all types to metavar if closured but declared inside block and never re-assigned doesn't assign all types to metavar if closured but declared inside block and never re-assigned - doesn't assign all types to metavar if closured but only assigned to once doesn't assign all types to metavar if closured but only assigned to once - errors if sending closured proc pointer to C (1) errors if sending closured proc pointer to C (1) - transforms block to proc literal without parameters transforms block to proc literal without parameters - says can't send closure to C with captured block says can't send closure to C with captured block - doesn't mark var as closured if only used in block doesn't mark var as closured if only used in block - marks outer fun as closured when using self marks outer fun as closured when using self - passes #227 passes #227 - transforms block to proc literal with void type transforms block to proc literal with void type - doesn't crash for non-existing variable (#3789) doesn't crash for non-existing variable (#3789) - marks variable as closured in program on assign marks variable as closured in program on assign - marks variable as closured in block marks variable as closured in block - errors if sending closured proc literal to C errors if sending closured proc literal to C - doesn't mark var as closured if only used in two block doesn't mark var as closured if only used in two block - marks method as self closured if instance var is written marks method as self closured if instance var is written - errors if giving more block args when transforming block to proc literal errors if giving more block args when transforming block to proc literal - marks method as self closured if explicit self call is made marks method as self closured if explicit self call is made - does assign all types to metavar if closured but only assigned to once in a loop through block does assign all types to metavar if closured but only assigned to once in a loop through block - errors if sending closured proc pointer to C (1.2) errors if sending closured proc pointer to C (1.2) - marks method as self closured if instance var is read marks method as self closured if instance var is read - does assign all types to metavar if closured but only assigned to once in a loop through captured block does assign all types to metavar if closured but only assigned to once in a loop through captured block - allows giving less block args when transforming block to proc literal allows giving less block args when transforming block to proc literal - doesn't closure typeof instance var (#9479) doesn't closure typeof instance var (#9479) - marks method as self closured if implicit self call is made marks method as self closured if implicit self call is made - marks method as self closured if used inside a block marks method as self closured if used inside a block -ASTNode#to_s - does to_s of "if true\n (1)\nend" does to_s of "if true\n (1)\nend" - does to_s of "1.~(2) do\nend" does to_s of "1.~(2) do\nend" - does to_s of "foo : (A | B).class" does to_s of "foo : (A | B).class" - does to_s of "({} of K => V).foo" does to_s of "({} of K => V).foo" - does to_s of "{%\n arr.each do\n b = 2\n a = 1\n end\n\n c = 3\n%}" does to_s of "{%\n arr.each do\n b = 2\n a = 1\n end\n\n c = 3\n%}" - does to_s of "%r( )" does to_s of "%r( )" - does to_s of "foo._bar(1)" does to_s of "foo._bar(1)" - does to_s of "if 1\n 2\nelse\n 3 ? 4 : 5\nend" does to_s of "if 1\n 2\nelse\n 3 ? 4 : 5\nend" - does to_s of "{% if 1 %}\n 2\n{% elsif 3 %}\n 4\n{% elsif 5 %}\n{% elsif 6 %}\n{% else %}\n 7\n{% end %}" does to_s of "{% if 1 %}\n 2\n{% elsif 3 %}\n 4\n{% elsif 5 %}\n{% elsif 6 %}\n{% else %}\n 7\n{% end %}" - does to_s of "foo do |k, v|\n k.bar(1, 2, 3)\nend" does to_s of "foo do |k, v|\n k.bar(1, 2, 3)\nend" - does to_s of "{% foo %}" does to_s of "{% foo %}" - does to_s of "-> : Int32 do\nend" does to_s of "-> : Int32 do\nend" - does to_s of "macro foo(x, **args)\nend" does to_s of "macro foo(x, **args)\nend" - does to_s of "def foo(x : Foo((T -> U)))\nend" does to_s of "def foo(x : Foo((T -> U)))\nend" - does to_s of "{% unless foo %}\n foo_then\n{% else %}\n foo_else\n{% end %}" does to_s of "{% unless foo %}\n foo_then\n{% else %}\n foo_else\n{% end %}" - does to_s of "foo(bar)" does to_s of "foo(bar)" - does to_s of "{%\n vals = [4, 1, 12]\n .sort_by do |v| v end\n .join\n .strip\n .chars\n .map do |v| v end\n%}" does to_s of "{%\n vals = [4, 1, 12]\n .sort_by do |v| v end\n .join\n .strip\n .chars\n .map do |v| v end\n%}" - does to_s of "type(Foo = Void)" does to_s of "type(Foo = Void)" - does to_s of "foo do\n begin\n bar\n end\nend" does to_s of "foo do\n begin\n bar\n end\nend" - does to_s of "%(\"\#{foo}\")" does to_s of "%(\"\#{foo}\")" - does to_s of "{%\n arr.each do |c|\n c.each do\n to_process << 1\n to_process << 2\n end\n end\n\n to_process.each do\n b = 2\n a = 1\n end\n%}" does to_s of "{%\n arr.each do |c|\n c.each do\n to_process << 1\n to_process << 2\n end\n end\n\n to_process.each do\n b = 2\n a = 1\n end\n%}" - does to_s of "1.&**" does to_s of "1.&**" - does to_s of "1.responds_to?(:to_s)" does to_s of "1.responds_to?(:to_s)" - does to_s of "..3" does to_s of "..3" - does to_s of "/\\(group\\)/" does to_s of "/\\(group\\)/" - does to_s of "{% for foo in bar %}\n {{ if true\n foo\n bar\n end }}\n{% end %}" does to_s of "{% for foo in bar %}\n {{ if true\n foo\n bar\n end }}\n{% end %}" - does to_s of "def foo(**options, &block)\nend" does to_s of "def foo(**options, &block)\nend" - does to_s of "if 1\n 2\nelse\n if 3\n end\nend" does to_s of "if 1\n 2\nelse\n if 3\n end\nend" - does to_s of "macro finished\n {% verbatim do %}\n {%\n 10\n\n # Foo\n\n 20\n %}\n {% end %}\nend" does to_s of "macro finished\n {% verbatim do %}\n {%\n 10\n\n # Foo\n\n 20\n %}\n {% end %}\nend" - does to_s of "offsetof(Foo, @bar)" does to_s of "offsetof(Foo, @bar)" - does to_s of "1.+ do\nend" does to_s of "1.+ do\nend" - does to_s of "{%\n a = 1\n\n if true\n b = 2\n c = 3\n end\n\n d = 4\n%}" does to_s of "{%\n a = 1\n\n if true\n b = 2\n c = 3\n end\n\n d = 4\n%}" - does to_s of "%r{\#{1}\\/\\0}" does to_s of "%r{\#{1}\\/\\0}" - does to_s of "->::Foo::Bar.foo" does to_s of "->::Foo::Bar.foo" - does to_s of "def foo(x : T = 1)\nend" does to_s of "def foo(x : T = 1)\nend" - does to_s of "{{ a = 1 }}" does to_s of "{{ a = 1 }}" - does to_s of "&+1" does to_s of "&+1" - does to_s of "case 1; in .foo?; 2; end" does to_s of "case 1; in .foo?; 2; end" - does to_s of "foo(x : Foo((T -> U)))" does to_s of "foo(x : Foo((T -> U)))" - does to_s of "asm(\"nop\" : \"a\"(1), \"b\"(2) : \"c\"(3), \"d\"(4) : \"e\", \"f\" : \"volatile\", \"alignstack\", \"intel\")" does to_s of "asm(\"nop\" : \"a\"(1), \"b\"(2) : \"c\"(3), \"d\"(4) : \"e\", \"f\" : \"volatile\", \"alignstack\", \"intel\")" - does to_s of "{{ foo }}" does to_s of "{{ foo }}" - does to_s of "_foo.bar" does to_s of "_foo.bar" - does to_s of "{%\n 2 + 2\n%}" does to_s of "{%\n 2 + 2\n%}" - does to_s of "foo.nil?" does to_s of "foo.nil?" - does to_s of "(1..)" does to_s of "(1..)" - does to_s of "def foo(x : (T -> U).class)\nend" does to_s of "def foo(x : (T -> U).class)\nend" - does to_s of "1 <= (2 <= 3)" does to_s of "1 <= (2 <= 3)" - does to_s of "1 & 2 & (3 | 4)" does to_s of "1 & 2 & (3 | 4)" - does to_s of "&-1" does to_s of "&-1" - does to_s of "macro foo\n{% @type %}\nend" does to_s of "macro foo\n{% @type %}\nend" - does to_s of "{%\n vals = \"foo\"\n .strip\n .strip.strip\n%}" does to_s of "{%\n vals = \"foo\"\n .strip\n .strip.strip\n%}" - does to_s of "class Foo\n private def bar\n end\nend" does to_s of "class Foo\n private def bar\n end\nend" - does to_s of "{(1 + 2)}" does to_s of "{(1 + 2)}" - does to_s of "{ {1, 2, 3} }" does to_s of "{ {1, 2, 3} }" - does to_s of "begin\n ()\nend" does to_s of "begin\n ()\nend" - does to_s of "%r()imx" does to_s of "%r()imx" - does to_s of "{%\n arr.each do\n b = 2\n a = 1\n end\n%}" does to_s of "{%\n arr.each do\n b = 2\n a = 1\n end\n%}" - does to_s of "{%\n {\n id: 1,\n\n # Foo\n pie: 3.14,\n }\n%}" does to_s of "{%\n {\n id: 1,\n\n # Foo\n pie: 3.14,\n }\n%}" - does to_s of "あ.い, う.え.お = 1, 2" does to_s of "あ.い, う.え.お = 1, 2" - does to_s of "def foo(x, **args, &block)\nend" does to_s of "def foo(x, **args, &block)\nend" - does to_s of "1[&.foo]?" does to_s of "1[&.foo]?" - does to_s of "def foo(x : (T -> U) -> V, *args : (T -> U) -> V, y : (T -> U) -> V, **opts : (T -> U) -> V, & : (T -> U) -> V) : ((T -> U) -> V)\nend" does to_s of "def foo(x : (T -> U) -> V, *args : (T -> U) -> V, y : (T -> U) -> V, **opts : (T -> U) -> V, & : (T -> U) -> V) : ((T -> U) -> V)\nend" - does to_s of "lib Foo\n A = Pointer(Void).new(0)\n struct B\n x : Void*\n y : Int[1]\n end\n fun c(Void*) : Char[2]*\nend" does to_s of "lib Foo\n A = Pointer(Void).new(0)\n struct B\n x : Void*\n y : Int[1]\n end\n fun c(Void*) : Char[2]*\nend" - does to_s of "1_f64" does to_s of "1_f64" - does to_s of "{%\n {\n id: 1,\n blah: false,\n pie: 3.14}\n%}" does to_s of "{%\n {\n id: 1,\n blah: false,\n pie: 3.14}\n%}" - does to_s of "foo(x : (T -> U) -> V, W)" does to_s of "foo(x : (T -> U) -> V, W)" - does to_s of "(1 || 1.1).as(Int32)" does to_s of "(1 || 1.1).as(Int32)" - does to_s of "1.[]=" does to_s of "1.[]=" - does to_s of "{%\n data = {__nil: nil}\n data[\"foo\"] = {\n id: 1,\n active: true,\n name: \"foo\".upcase,\n pie: 3.14,\n }\n%}" does to_s of "{%\n data = {__nil: nil}\n data[\"foo\"] = {\n id: 1,\n active: true,\n name: \"foo\".upcase,\n pie: 3.14,\n }\n%}" - does to_s of "def foo(x : (T -> U) | V)\nend" does to_s of "def foo(x : (T -> U) | V)\nend" - does to_s of "def foo(& : (->))\nend" does to_s of "def foo(& : (->))\nend" - does to_s of "{%\n 1\n%}" does to_s of "{%\n 1\n%}" - does to_s of "{%\n {\n id: 1,\n\n blah: false,\n\n pie: 3.14,\n }\n%}" does to_s of "{%\n {\n id: 1,\n\n blah: false,\n\n pie: 3.14,\n }\n%}" - does to_s of "{% for foo in bar %}\n {{ foo }}\n{% end %}" does to_s of "{% for foo in bar %}\n {{ foo }}\n{% end %}" - does to_s of "foo[x, y, a: 1, b: 2]" does to_s of "foo[x, y, a: 1, b: 2]" - does to_s of "alias Foo = Void" does to_s of "alias Foo = Void" - does to_s of "def foo(x y)\nend" does to_s of "def foo(x y)\nend" - does to_s of "def foo(@[Foo] x, @[Bar] **args, @[Baz] &block)\nend" does to_s of "def foo(@[Foo] x, @[Bar] **args, @[Baz] &block)\nend" - does to_s of "{% a = 1 %}" does to_s of "{% a = 1 %}" - does to_s of "{% if foo %}\n foo_then\n{% end %}" does to_s of "{% if foo %}\n foo_then\n{% end %}" - does to_s of "1.~(2)" does to_s of "1.~(2)" - does to_s of "1.//(2, a: 3)" does to_s of "1.//(2, a: 3)" - does to_s of "macro foo(&block)\nend" does to_s of "macro foo(&block)\nend" - does to_s of "def foo(@[Foo] x : T = 1)\nend" does to_s of "def foo(@[Foo] x : T = 1)\nend" - does to_s of "{%\n (\n 1\n 2\n )\n%}" does to_s of "{%\n (\n 1\n 2\n )\n%}" - does to_s of "macro foo\n\\{{ @type }}\nend" does to_s of "macro foo\n\\{{ @type }}\nend" - does to_s of "{% unless 1 %}\n 2\n{% else %}{% if 3 %}\n{% end %}{% end %}" does to_s of "{% unless 1 %}\n 2\n{% else %}{% if 3 %}\n{% end %}{% end %}" - does to_s of `#{::String.interpolation(x)}` does to_s of `#{::String.interpolation(x)}` - does to_s of x = (1 -2 -) does to_s of x = (1 -2 -) - does to_s of "lib LibFoo\n fun foo(x : (T -> U).class)\nend" does to_s of "lib LibFoo\n fun foo(x : (T -> U).class)\nend" - does to_s of "def foo(**args)\nend" does to_s of "def foo(**args)\nend" - does to_s of "1 <= 2 <= 3" does to_s of "1 <= 2 <= 3" - does to_s of "/hello world/imx" does to_s of "/hello world/imx" - does to_s of "asm(\"bl trap\" :::: \"unwind\")" does to_s of "asm(\"bl trap\" :::: \"unwind\")" - does to_s of "return true ? 1 : 2" does to_s of "return true ? 1 : 2" - does to_s of "macro foo(&)\nend" does to_s of "macro foo(&)\nend" - does to_s of "{%\n {id: 1,\n blah: false,\n pie: 3.14}\n%}" does to_s of "{%\n {id: 1,\n blah: false,\n pie: 3.14}\n%}" - does to_s of "%r{\\/\\0}" does to_s of "%r{\\/\\0}" - does to_s of "1.[](2) do\nend" does to_s of "1.[](2) do\nend" - does to_s of "/\\?/" does to_s of "/\\?/" - does to_s of "foo x: 1, y: 2, &.bar" does to_s of "foo x: 1, y: 2, &.bar" - does to_s of "{%\n if (true || false) &&\n true\n 1\n end\n%}" does to_s of "{%\n if (true || false) &&\n true\n 1\n end\n%}" - does to_s of "foo(&.==(2))" does to_s of "foo(&.==(2))" - does to_s of "yield(1)" does to_s of "yield(1)" - does to_s of "begin\n (1)\n 2\nrescue\nend" does to_s of "begin\n (1)\n 2\nrescue\nend" - does to_s of "foo[x : (T -> U) -> V, W] = 1" does to_s of "foo[x : (T -> U) -> V, W] = 1" - does to_s of "(1 & 2) & (3 | 4)" does to_s of "(1 & 2) & (3 | 4)" - does to_s of "if 1\n begin\n 2\n end\nelse\n begin\n 3\n end\nend" does to_s of "if 1\n begin\n 2\n end\nelse\n begin\n 3\n end\nend" - does to_s of "/\\s/" does to_s of "/\\s/" - does to_s of "{%\n true && (\n true ||\n false\n )\n%}" does to_s of "{%\n true && (\n true ||\n false\n )\n%}" - does to_s of "foo &.bar" does to_s of "foo &.bar" - does to_s of "%x(whoami)" does to_s of "%x(whoami)" - does to_s of "{%\n a = 1 %}" does to_s of "{%\n a = 1 %}" - does to_s of "lib Foo\nend" does to_s of "lib Foo\nend" - does to_s of "{% verbatim do %}\n 1{{ 2 }}\n 3{{ 4 }}\n{% end %}" does to_s of "{% verbatim do %}\n 1{{ 2 }}\n 3{{ 4 }}\n{% end %}" - does to_s of "macro foo\n %bar{1, x} = 1\nend" does to_s of "macro foo\n %bar{1, x} = 1\nend" - does to_s of "foo { |(x, (y, z))| x }" does to_s of "foo { |(x, (y, z))| x }" - does to_s of "{\"foo bar\": 1}" does to_s of "{\"foo bar\": 1}" - does to_s of "`\\n\\0`" does to_s of "`\\n\\0`" - does to_s of "{% [1, 2, 3].find(&.even?.!) %}" does to_s of "{% [1, 2, 3].find(&.even?.!) %}" - does to_s of "asm(\"nop\" ::::)" does to_s of "asm(\"nop\" ::::)" - does to_s of "fun foo(a : Void, b : Void, ...) : Void\nend" does to_s of "fun foo(a : Void, b : Void, ...) : Void\nend" - does to_s of "macro foo(x, @[Foo] *y)\nend" does to_s of "macro foo(x, @[Foo] *y)\nend" - does to_s of "def foo(x)\n yield\nend" does to_s of "def foo(x)\n yield\nend" - does to_s of "他.说 = \"你好\"" does to_s of "他.说 = \"你好\"" - does to_s of "macro foo\n{% verbatim do %}1{% end %}\nend" does to_s of "macro foo\n{% verbatim do %}1{% end %}\nend" - does to_s of "{ {1, 2, 3} => 4 }" does to_s of "{ {1, 2, 3} => 4 }" - does to_s of "{%\n ({\"a\" => \"b\"} of Nil => Nil).each do |k, v|\n # stuff and things\n k + v\n\n # foo bar\n\n k + v\n end\n%}" does to_s of "{%\n ({\"a\" => \"b\"} of Nil => Nil).each do |k, v|\n # stuff and things\n k + v\n\n # foo bar\n\n k + v\n end\n%}" - does to_s of "macro foo(*var)\nend" does to_s of "macro foo(*var)\nend" - does to_s of "(a = 2) && 1" does to_s of "(a = 2) && 1" - does to_s of "1.//(2, &block)" does to_s of "1.//(2, &block)" - does to_s of "{%\n [1, 2, 3].find do |e|\n e.even?\n end\n%}" does to_s of "{%\n [1, 2, 3].find do |e|\n e.even?\n end\n%}" - does to_s of "%r()" does to_s of "%r()" - does to_s of "/a/x" does to_s of "/a/x" - does to_s of "1.0" does to_s of "1.0" - does to_s of "{%\n if 1\n 2\n end\n 3\n 4\n%}" does to_s of "{%\n if 1\n 2\n end\n 3\n 4\n%}" - does to_s of "foo(\"bar baz\": 2)" does to_s of "foo(\"bar baz\": 2)" - does to_s of "{%\n (\n 1\n )\n%}" does to_s of "{%\n (\n 1\n )\n%}" - does to_s of "begin\n (1)\n 2\nend" does to_s of "begin\n (1)\n 2\nend" - does to_s of "def foo(x, **args)\nend" does to_s of "def foo(x, **args)\nend" - does to_s of "[(1 + 2)] of Int32" does to_s of "[(1 + 2)] of Int32" - does to_s of "fun foo\nend" does to_s of "fun foo\nend" - does to_s of "foo &.bar(1, 2, 3)" does to_s of "foo &.bar(1, 2, 3)" - does to_s of "foo(x : (T -> U) | V)" does to_s of "foo(x : (T -> U) | V)" - does to_s of "{% [1, 2, 3].each { |v| pp(v) } %}" does to_s of "{% [1, 2, 3].each { |v| pp(v) } %}" - does to_s of "case 1\nwhen .[](2)\n 3\nwhen .[]=(4)\n 5\nend" does to_s of "case 1\nwhen .[](2)\n 3\nwhen .[]=(4)\n 5\nend" - does to_s of "1e10_f64" does to_s of "1e10_f64" - does to_s of "foo do |(x, (y, z))|\n x\nend" does to_s of "foo do |(x, (y, z))|\n x\nend" - does to_s of "alias Foo::Bar = Void" does to_s of "alias Foo::Bar = Void" - does to_s of "macro foo(x)\n yield\nend" does to_s of "macro foo(x)\n yield\nend" - does to_s of "macro finished\n {% verbatim do %}\n {%\n\n\n a = 1\n b = 2 %}\n {% end %}\nend" does to_s of "macro finished\n {% verbatim do %}\n {%\n\n\n a = 1\n b = 2 %}\n {% end %}\nend" - does to_s of "macro finished\n {% verbatim do %}\n {%\n nt = {\n id: 1,\n\n # Foo\n pie: 3.14,\n }\n %}\n {% end %}\nend" does to_s of "macro finished\n {% verbatim do %}\n {%\n nt = {\n id: 1,\n\n # Foo\n pie: 3.14,\n }\n %}\n {% end %}\nend" - does to_s of "1.as(Int32)" does to_s of "1.as(Int32)" - does to_s of "macro foo\n 123\nend" does to_s of "macro foo\n 123\nend" - does to_s of "def foo(x : X, y : Y) forall X, Y\nend" does to_s of "def foo(x : X, y : Y) forall X, Y\nend" - does to_s of "begin\n (1)\nrescue\nend" does to_s of "begin\n (1)\nrescue\nend" - does to_s of "asm(\"nop\" :: \"a\"(1) :: \"volatile\")" does to_s of "asm(\"nop\" :: \"a\"(1) :: \"volatile\")" - does to_s of "macro foo(@[Foo] **args)\nend" does to_s of "macro foo(@[Foo] **args)\nend" - does to_s of "macro foo(*, var)\nend" does to_s of "macro foo(*, var)\nend" - does to_s of "foo : A | (B -> C)" does to_s of "foo : A | (B -> C)" - does to_s of "macro foo\n %bar = 1\nend" does to_s of "macro foo\n %bar = 1\nend" - does to_s of "macro finished\n {% verbatim do %}\n {%\n\n a = 1 %}\n {% end %}\nend" does to_s of "macro finished\n {% verbatim do %}\n {%\n\n a = 1 %}\n {% end %}\nend" - does to_s of "{%\n [1, 2, 3].each { |v| pp(v) }\n%}" does to_s of "{%\n [1, 2, 3].each { |v| pp(v) }\n%}" - does to_s of "/ /" does to_s of "/ /" - does to_s of "!a" does to_s of "!a" - does to_s of "def foo(*args)\nend" does to_s of "def foo(*args)\nend" - does to_s of "{ {foo: 2} }" does to_s of "{ {foo: 2} }" - does to_s of "{%\n (\n true ||\n false\n )\n%}" does to_s of "{%\n (\n true ||\n false\n )\n%}" - does to_s of "macro finished\n {% verbatim do %}\n {%\n 10\n 20\n %}\n {% end %}\nend" does to_s of "macro finished\n {% verbatim do %}\n {%\n 10\n 20\n %}\n {% end %}\nend" - does to_s of "{%\n vals = \"foo\".strip.strip\n .strip\n%}" does to_s of "{%\n vals = \"foo\".strip.strip\n .strip\n%}" - does to_s of ":\"{\"" does to_s of ":\"{\"" - does to_s of "def foo(*args : _)\nend" does to_s of "def foo(*args : _)\nend" - does to_s of "macro foo\n{{ @type }}\nend" does to_s of "macro foo\n{{ @type }}\nend" - does to_s of "foo.*" does to_s of "foo.*" - does to_s of "/\#{1 / 2}/" does to_s of "/\#{1 / 2}/" - does to_s of "1[2, x: 3, &.foo] = 4" does to_s of "1[2, x: 3, &.foo] = 4" - does to_s of "{%\n (\n true ||\n false\n ) && true\n%}" does to_s of "{%\n (\n true ||\n false\n ) && true\n%}" - does to_s of "(1 + 2)..3" does to_s of "(1 + 2)..3" - does to_s of "unless 1\n 2\nelse\n if 3\n end\nend" does to_s of "unless 1\n 2\nelse\n if 3\n end\nend" - does to_s of "\"\#{(1 + 2)}\"" does to_s of "\"\#{(1 + 2)}\"" - does to_s of "1.+(&block)" does to_s of "1.+(&block)" - does to_s of "macro finished\n {% verbatim do %}\n {%\n 10\n %}\n {% end %}\nend" does to_s of "macro finished\n {% verbatim do %}\n {%\n 10\n %}\n {% end %}\nend" - does to_s of "macro finished\n {% verbatim do %}\n {% a = 1\n b = 2\n\n %}\n {% end %}\nend" does to_s of "macro finished\n {% verbatim do %}\n {% a = 1\n b = 2\n\n %}\n {% end %}\nend" - does to_s of "def foo(& : ->)\nend" does to_s of "def foo(& : ->)\nend" - does to_s of "macro foo(x, *y)\nend" does to_s of "macro foo(x, *y)\nend" - does to_s of "{% if 1 %}\n 2\n{% else %}{% unless 3 %}\n{% end %}{% end %}" does to_s of "{% if 1 %}\n 2\n{% else %}{% unless 3 %}\n{% end %}{% end %}" - does to_s of "foo { |i| i.bar { i } }" does to_s of "foo { |i| i.bar { i } }" - does to_s of "enum A : B\nend" does to_s of "enum A : B\nend" - does to_s of "foo._bar" does to_s of "foo._bar" - does to_s of "asm(\"nop\" :: \"c\"(3), \"d\"(4) ::)" does to_s of "asm(\"nop\" :: \"c\"(3), \"d\"(4) ::)" - does to_s of "(1 + 2).as(Int32)" does to_s of "(1 + 2).as(Int32)" - does to_s of "foo do |(x, y)|\n x\nend" does to_s of "foo do |(x, y)|\n x\nend" - does to_s of "asm(\"nop\" :::: \"volatile\")" does to_s of "asm(\"nop\" :::: \"volatile\")" - does to_s of "foo { |(x, y)| x }" does to_s of "foo { |(x, y)| x }" - does to_s of "{% a = 1\n%}" does to_s of "{% a = 1\n%}" - does to_s of "asm(\"nop\" ::: \"e\" : \"volatile\")" does to_s of "asm(\"nop\" ::: \"e\" : \"volatile\")" - does to_s of "{%\n vals = [4, 1, 12]\n .sort_by do |v| v end\n .map do |v| v end\n%}" does to_s of "{%\n vals = [4, 1, 12]\n .sort_by do |v| v end\n .map do |v| v end\n%}" - does to_s of "x.foo.!" does to_s of "x.foo.!" - does to_s of "/\\//" does to_s of "/\\//" - does to_s of "{% if 1 %}\n 2\n{% else %}{% if 3 %}\n{% end %}{% end %}" does to_s of "{% if 1 %}\n 2\n{% else %}{% if 3 %}\n{% end %}{% end %}" - does to_s of "{%\n data = {__nil: nil}\n data[\"foo\"] = {\n id: 1, active: true,\n name: \"foo\".upcase,\n pie: 3.14,\n }\n%}" does to_s of "{%\n data = {__nil: nil}\n data[\"foo\"] = {\n id: 1, active: true,\n name: \"foo\".upcase,\n pie: 3.14,\n }\n%}" - does to_s of "1_f32" does to_s of "1_f32" - does to_s of "{%\n a = 1\n\n unless false\n b = 2\n c = 3\n end\n\n d = 4\n%}" does to_s of "{%\n a = 1\n\n unless false\n b = 2\n c = 3\n end\n\n d = 4\n%}" - does to_s of "`\#{1}\\n\\0`" does to_s of "`\#{1}\\n\\0`" - does to_s of "lib LibC\n fun getchar(Int, Float)\nend" does to_s of "lib LibC\n fun getchar(Int, Float)\nend" - does to_s of "begin\n (1)\nend" does to_s of "begin\n (1)\nend" - does to_s of "\"\#{1}\\0\"" does to_s of "\"\#{1}\\0\"" - does to_s of "if 1\n 2\nelsif 3\n 4\nelsif 5\nelsif 6\nelse\n 7\nend" does to_s of "if 1\n 2\nelsif 3\n 4\nelsif 5\nelsif 6\nelse\n 7\nend" - does to_s of "{%\n if 1\n 2\n end\n 3\n%}" does to_s of "{%\n if 1\n 2\n end\n 3\n%}" - does to_s of "->::foo(Int32, String)" does to_s of "->::foo(Int32, String)" - does to_s of "foo[x, y, a: 1, b: 2] = z" does to_s of "foo[x, y, a: 1, b: 2] = z" - does to_s of "enum Foo\n A = 0\n B\nend" does to_s of "enum Foo\n A = 0\n B\nend" - does to_s of "# doc\ndef foo\nend" does to_s of "# doc\ndef foo\nend" - does to_s of "lib LibC\n fun getch = \"get.char\"\nend" does to_s of "lib LibC\n fun getch = \"get.char\"\nend" - does to_s of "{% unless foo %}\n foo_then\n{% end %}" does to_s of "{% unless foo %}\n foo_then\n{% end %}" - does to_s of "def foo(@[Foo] **args)\nend" does to_s of "def foo(@[Foo] **args)\nend" - does to_s of "{% {id: 10} %}" does to_s of "{% {id: 10} %}" - does to_s of "lib Foo::Bar\nend" does to_s of "lib Foo::Bar\nend" - does to_s of "lib LibFoo\n fun foo(x : (T -> U) | V)\nend" does to_s of "lib LibFoo\n fun foo(x : (T -> U) | V)\nend" - does to_s of "Foo(\"bar baz\": Int32)" does to_s of "Foo(\"bar baz\": Int32)" - does to_s of "\"\\e\\0\\\"\"" does to_s of "\"\\e\\0\\\"\"" - does to_s of "def foo(x, **args, &block : (_ -> _))\nend" does to_s of "def foo(x, **args, &block : (_ -> _))\nend" - does to_s of "{%\n 1\n 2\n 3\n%}" does to_s of "{%\n 1\n 2\n 3\n%}" - does to_s of "1 && (a = 2)" does to_s of "1 && (a = 2)" - does to_s of "([] of T).foo" does to_s of "([] of T).foo" - does to_s of "(1 <= 2) <= 3" does to_s of "(1 <= 2) <= 3" - does to_s of "foo(1, (2 + 3), bar: (4 + 5))" does to_s of "foo(1, (2 + 3), bar: (4 + 5))" - does to_s of "def foo(**x)\n yield\nend" does to_s of "def foo(**x)\n yield\nend" - does to_s of "1[&.foo]" does to_s of "1[&.foo]" - does to_s of "{% if foo %}\n foo_then\n{% else %}\n foo_else\n{% end %}" does to_s of "{% if foo %}\n foo_then\n{% else %}\n foo_else\n{% end %}" - does to_s of "Foo()" does to_s of "Foo()" - does to_s of "(~1).foo" does to_s of "(~1).foo" - does to_s of "def foo\n yield\nend" does to_s of "def foo\n yield\nend" - does to_s of "macro foo\n\\{%@type %}\nend" does to_s of "macro foo\n\\{%@type %}\nend" - does to_s of "foo(x : (T -> U).class)" does to_s of "foo(x : (T -> U).class)" - does to_s of "a.as?(Int32)" does to_s of "a.as?(Int32)" - does to_s of "x.!.foo" does to_s of "x.!.foo" - does to_s of "if true\n (1)\n 2\nend" does to_s of "if true\n (1)\n 2\nend" - does to_s of "macro finished\n {% verbatim do %}\n {%\n 10\n\n # Foo\n 20\n %}\n {% end %}\nend" does to_s of "macro finished\n {% verbatim do %}\n {%\n 10\n\n # Foo\n 20\n %}\n {% end %}\nend" - does to_s of "{ {1 => 2} }" does to_s of "{ {1 => 2} }" - does to_s of "case 1; when .!; 2; when .< 0; 3; end" does to_s of "case 1; when .!; 2; when .< 0; 3; end" - does to_s of "!a.b && true" does to_s of "!a.b && true" - does to_s of "foo.%" does to_s of "foo.%" - does to_s of "macro foo(*, __var var)\nend" does to_s of "macro foo(*, __var var)\nend" - does to_s of "if 1\n 2\nelse\n unless 3\n end\nend" does to_s of "if 1\n 2\nelse\n unless 3\n end\nend" - does to_s of "lib LibFoo\n fun foo(x : Foo((T -> U)))\nend" does to_s of "lib LibFoo\n fun foo(x : Foo((T -> U)))\nend" - does to_s of "foo(a.as(Int32))" does to_s of "foo(a.as(Int32))" - does to_s of ":foo" does to_s of ":foo" - does to_s of "x.foo.!.!" does to_s of "x.foo.!.!" - does to_s of "{%\n if (v = 5) &&\n (\n 1 < v ||\n (v < 4 && 5 < 6)\n )\n 123\n end\n%}" does to_s of "{%\n if (v = 5) &&\n (\n 1 < v ||\n (v < 4 && 5 < 6)\n )\n 123\n end\n%}" - does to_s of "@[Foo(1, 2, a: 1, b: 2)]" does to_s of "@[Foo(1, 2, a: 1, b: 2)]" - does to_s of "1[2, x: 3, &.foo]" does to_s of "1[2, x: 3, &.foo]" - does to_s of "macro foo\n %bar = 1; end" does to_s of "macro foo\n %bar = 1; end" - does to_s of "class Foo\n # doc\n def foo\n end\nend" does to_s of "class Foo\n # doc\n def foo\n end\nend" - does to_s of "(1 + 2).as?(Int32)" does to_s of "(1 + 2).as?(Int32)" - does to_s of "他.说(\"你好\")" does to_s of "他.说(\"你好\")" - does to_s of "/hello world/" does to_s of "/hello world/" - does to_s of "def foo(x : X, @[Foo] y : Y) forall X, Y\nend" does to_s of "def foo(x : X, @[Foo] y : Y) forall X, Y\nend" - does to_s of "1.&*" does to_s of "1.&*" - does to_s of "1[&.foo] = 2" does to_s of "1[&.foo] = 2" - does to_s of "{foo: (1 + 2)}" does to_s of "{foo: (1 + 2)}" - does to_s of "def foo(@[Foo] *args)\nend" does to_s of "def foo(@[Foo] *args)\nend" - does to_s of "!(1 < 2)" does to_s of "!(1 < 2)" - does to_s of "def foo(x, **args, &block : _ -> _)\nend" does to_s of "def foo(x, **args, &block : _ -> _)\nend" - does to_s of "def foo(\"bar baz\" qux)\nend" does to_s of "def foo(\"bar baz\" qux)\nend" - does to_s of "lib Foo\n union Foo\n a : Int\n b : Int32\n end\nend" does to_s of "lib Foo\n union Foo\n a : Int\n b : Int32\n end\nend" - does to_s of "lib Foo\n FOO = 0\nend" does to_s of "lib Foo\n FOO = 0\nend" - does to_s of "macro foo(@[Foo] x, @[Foo] *y)\nend" does to_s of "macro foo(@[Foo] x, @[Foo] *y)\nend" - does to_s of "1.responds_to?(:\"&&\")" does to_s of "1.responds_to?(:\"&&\")" - does to_s of "x.!.!.foo" does to_s of "x.!.!.foo" - does to_s of "macro foo(@[Foo] &block)\nend" does to_s of "macro foo(@[Foo] &block)\nend" - does to_s of "{%\n vals = \"foo\".strip.strip.strip\n%}" does to_s of "{%\n vals = \"foo\".strip.strip.strip\n%}" - does to_s of "def foo(x, @[Foo] **args)\nend" does to_s of "def foo(x, @[Foo] **args)\nend" - does to_s of "macro foo(@[Foo] &)\nend" does to_s of "macro foo(@[Foo] &)\nend" - does to_s of "select\nwhen foo\n select\n when bar\n 1\n else\n 2\n end\nelse\n select\n when baz\n 3\n else\n 4\n end\nend" does to_s of "select\nwhen foo\n select\n when bar\n 1\n else\n 2\n end\nelse\n select\n when baz\n 3\n else\n 4\n end\nend" - does to_s of "1.+(a: 2)" does to_s of "1.+(a: 2)" - does to_s of "->(x : Int32, y : Bool) : Char do\n 'a'\nend" does to_s of "->(x : Int32, y : Bool) : Char do\n 'a'\nend" - does to_s of "{%\n {id: 1,\n blah: false,\n pie: 3.14,\n }\n%}" does to_s of "{%\n {id: 1,\n blah: false,\n pie: 3.14,\n }\n%}" - does to_s of "macro foo(@[Foo] id)\nend" does to_s of "macro foo(@[Foo] id)\nend" - does to_s of "macro foo(**args)\nend" does to_s of "macro foo(**args)\nend" - does to_s of "1[2, x: 3, &.foo]?" does to_s of "1[2, x: 3, &.foo]?" - does to_s of "foo(3, &.*(2))" does to_s of "foo(3, &.*(2))" - does to_s of "begin\n (@x = x).is_a?(Foo)\nend" does to_s of "begin\n (@x = x).is_a?(Foo)\nend" - does to_s of "def foo(@[Foo] x y)\nend" does to_s of "def foo(@[Foo] x y)\nend" - does to_s of "macro foo(x, @[Foo] **args)\nend" does to_s of "macro foo(x, @[Foo] **args)\nend" - does to_s of "def foo(**args : T)\nend" does to_s of "def foo(**args : T)\nend" - does to_s of "{%\n data = {__nil: nil}\n data[\"foo\"] = {\n id: 1, active: true,\n name: \"foo\".upcase,\n pie: 3.14, biz: \"baz\", blah: false,\n }\n%}" does to_s of "{%\n data = {__nil: nil}\n data[\"foo\"] = {\n id: 1, active: true,\n name: \"foo\".upcase,\n pie: 3.14, biz: \"baz\", blah: false,\n }\n%}" - does to_s of "if (1 + 2\n3)\n 4\nend" does to_s of "if (1 + 2\n3)\n 4\nend" - does to_s of "@foo.bar" does to_s of "@foo.bar" - does to_s of "case 1; when .foo?; 2; end" does to_s of "case 1; when .foo?; 2; end" - does to_s of "lib Foo\n struct Foo\n a : Void\n b : Void\n end\nend" does to_s of "lib Foo\n struct Foo\n a : Void\n b : Void\n end\nend" - does to_s of "%r(/)" does to_s of "%r(/)" - does to_s of "return begin\n 1\n 2\nend" does to_s of "return begin\n 1\n 2\nend" - does to_s of "foo()" does to_s of "foo()" - does to_s of "macro foo\n {% for foo in bar %}\n {{ foo }}\n {% end %}\nend" does to_s of "macro foo\n {% for foo in bar %}\n {{ foo }}\n {% end %}\nend" - does to_s of "foo[x : (T -> U) -> V, W]" does to_s of "foo[x : (T -> U) -> V, W]" - does to_s of "macro finished\n {% verbatim do %}\n {%\n 10\n\n # Foo\n\n 20\n 30\n\n # Bar\n\n 40\n %}\n {%\n 50\n 60\n %}\n {% end %}\nend" does to_s of "macro finished\n {% verbatim do %}\n {%\n 10\n\n # Foo\n\n 20\n 30\n\n # Bar\n\n 40\n %}\n {%\n 50\n 60\n %}\n {% end %}\nend" - does to_s of "lib LibFoo\n fun foo(x : (T -> U) -> V, W) : ((T -> U) -> V)\nend" does to_s of "lib LibFoo\n fun foo(x : (T -> U) -> V, W) : ((T -> U) -> V)\nend" - does to_s of "{(1 + 2) => (3 + 4)}" does to_s of "{(1 + 2) => (3 + 4)}" -Lexer string - lexes string with newline lexes string with newline - says syntax error on "\"\\uDFFF\"" says syntax error on "\"\\uDFFF\"" - lexes string with interpolation lexes string with interpolation - lexes heredoc with \r\n lexes heredoc with \r\n - lexes regex string with special chars with /.../ lexes regex string with special chars with /.../ - says syntax error on "\"\\u{}\"" says syntax error on "\"\\u{}\"" - lexes regex string with escaped slash with /.../ lexes regex string with escaped slash with /.../ - says syntax error on "\"\\u{DFFF}\"" says syntax error on "\"\\u{DFFF}\"" - lexes string with slash quote lexes string with slash quote - lexes simple string with %| lexes simple string with %| - lexes simple string with nested %{ lexes simple string with nested %{ - says syntax error on "\"\\u{D800}\"" says syntax error on "\"\\u{D800}\"" - lexes string with interpolation with double numeral lexes string with interpolation with double numeral - lexes regex string with escaped space with %r(...) lexes regex string with escaped space with %r(...) - raises on unterminated heredoc raises on unterminated heredoc - lexes string with literal newline lexes string with literal newline - lexes string with slash t lexes string with slash t - says syntax error on "\"\\uFEDZ\"" says syntax error on "\"\\uFEDZ\"" - lexes heredoc with spaces before close tag lexes heredoc with spaces before close tag - lexes string with unicode codepoint in curly multiple times lexes string with unicode codepoint in curly multiple times - lexes simple string with nested %[ lexes simple string with nested %[ - lexes backtick string lexes backtick string - says syntax error on "\"\\u{110000}\"" says syntax error on "\"\\u{110000}\"" - lexes double numeral lexes double numeral - raises when identifier doesn't start with a letter or number raises when identifier doesn't start with a letter or number - lexes simple string lexes simple string - lexes simple string with nested %< lexes simple string with nested %< - lexes regex string lexes regex string - says syntax error on "\"\\uD800\"" says syntax error on "\"\\uD800\"" - lexes interpolations in heredocs lexes interpolations in heredocs - lexes string with numeral lexes string with numeral - lexes regex string with special chars with %r(...) lexes regex string with special chars with %r(...) - assigns correct location after heredoc (#346) assigns correct location after heredoc (#346) - lexes heredoc with empty line lexes heredoc with empty line - lexes string with unicode codepoint in curly lexes string with unicode codepoint in curly - lexes string with backslash lexes string with backslash - lexes simple string with %( lexes simple string with %( - lexes string with unicode codepoint lexes string with unicode codepoint - lexes regex string with escaped space with /.../ lexes regex string with escaped space with /.../ - raises on unexpected EOF while lexing heredoc raises on unexpected EOF while lexing heredoc - lexes heredoc lexes heredoc - lexes regex string with escaped slash with %r(...) lexes regex string with escaped slash with %r(...) - lexes string with only newline lexes string with only newline - lexes slash with no-escape char lexes slash with no-escape char - lexes string with slash lexes string with slash - lexes simple string with nested %( lexes simple string with nested %( -Code gen: closure - transforms block to proc literal transforms block to proc literal - codegen closure in instance method without self closured codegen closure in instance method without self closured - closures struct self closures struct self - codegens nested closure with block (2) codegens nested closure with block (2) - allows passing an external function along allows passing an external function along - codegens simple closure in block codegens simple closure in block - codegens closure with self and var codegens closure with self and var - codegens closure with instance var and var codegens closure with instance var and var - codegens closured nested in block codegens closured nested in block - codegens simple closure in function with argument codegens simple closure in function with argument - codegens closure inside initialize inside block with self codegens closure inside initialize inside block with self - allows giving less block args when transforming block to proc literal allows giving less block args when transforming block to proc literal - allows passing block as proc literal to new and to initialize allows passing block as proc literal to new and to initialize - allows passing an external function along (2) allows passing an external function along (2) - codegens simple closure in function codegens simple closure in function - captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) captures block and accesses local variable (#2050) - codegens closure with self and arguments codegens closure with self and arguments - codegens nested closure codegens nested closure - codegens proc literal with struct codegens proc literal with struct - codegens closure with struct codegens closure with struct - codegens nested closure with nested closured variable codegens nested closure with nested closured variable - codegens closure with implicit self and var codegens closure with implicit self and var - transforms block to proc literal with free var transforms block to proc literal with free var - ensures it can raise from the closure check ensures it can raise from the closure check - doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self doesn't form a closure if invoking class method with self - codegens closure with nested context without new closured vars codegens closure with nested context without new closured vars - codegens closure with nested context without new closured vars codegens closure with nested context without new closured vars - codegens closured self in block (#3388) codegens closured self in block (#3388) - codegens nested closure that mentions var in both contexts codegens nested closure that mentions var in both contexts - allows mixing yield and block.call allows mixing yield and block.call - codegens super nested closure with nested closured variable codegens super nested closure with nested closured variable - doesn't free closure memory (bug) doesn't free closure memory (bug) doesn't free closure memory (bug) doesn't free closure memory (bug) doesn't free closure memory (bug) doesn't free closure memory (bug) doesn't free closure memory (bug) doesn't free closure memory (bug) doesn't free closure memory (bug) doesn't free closure memory (bug) - codegens closure with block that declares same var codegens closure with block that declares same var - codegens nested closure with block (1) codegens nested closure with block (1) - codegens simple closure at global scope codegens simple closure at global scope - codegens closured nested in block with a call with a closure with same names codegens closured nested in block with a call with a closure with same names - codegens super nested closure codegens super nested closure - codegens closure with block codegens closure with block - codegens closure with instance var codegens closure with instance var - codegens closure with def that has an if codegens closure with def that has an if - unifies types of closured var unifies types of closured var - codegens closure with nested context without new closured vars but with block arg codegens closure with nested context without new closured vars but with block arg - doesn't incorrectly consider local as closured (#4948) doesn't incorrectly consider local as closured (#4948) - allows passing proc literal to def that captures block with & allows passing proc literal to def that captures block with & - doesn't form a closure if invoking class method doesn't form a closure if invoking class method doesn't form a closure if invoking class method doesn't form a closure if invoking class method doesn't form a closure if invoking class method doesn't form a closure if invoking class method doesn't form a closure if invoking class method doesn't form a closure if invoking class method doesn't form a closure if invoking class method doesn't form a closure if invoking class method - codegens closure with instance var and block codegens closure with instance var and block - codegens multiple nested blocks codegens multiple nested blocks -semantic: case - checks exhaustiveness of bool type (missing true) checks exhaustiveness of bool type (missing true) - checks exhaustiveness for tuple literal of 3 elements, all enums checks exhaustiveness for tuple literal of 3 elements, all enums - checks exhaustiveness of union with bool checks exhaustiveness of union with bool - checks exhaustiveness of enum via question method checks exhaustiveness of enum via question method - checks exhaustiveness for tuple literal with bool and underscore at first position, partial match checks exhaustiveness for tuple literal with bool and underscore at first position, partial match - checks exhaustiveness of single type (generic) checks exhaustiveness of single type (generic) - checks exhaustiveness for tuple literal of 2 elements, first is enum checks exhaustiveness for tuple literal of 2 elements, first is enum - checks exhaustiveness for tuple literal with bool and underscore at first position checks exhaustiveness for tuple literal with bool and underscore at first position - checks exhaustiveness for tuple literal of 2 elements, first is bool checks exhaustiveness for tuple literal of 2 elements, first is bool - checks exhaustiveness for tuple literal, and passes checks exhaustiveness for tuple literal, and passes - checks exhaustiveness for tuple literal with bool and underscore at second position, partial match checks exhaustiveness for tuple literal with bool and underscore at second position, partial match - checks exhaustiveness for tuple literal with types and underscore at second position checks exhaustiveness for tuple literal with types and underscore at second position - checks exhaustiveness for tuple literal of 2 elements, and warns checks exhaustiveness for tuple literal of 2 elements, and warns - checks exhaustiveness for tuple literal of 3 elements, and warns checks exhaustiveness for tuple literal of 3 elements, and warns - can't prove case is exhaustive for @[Flags] enum, tuple case can't prove case is exhaustive for @[Flags] enum, tuple case - checks exhaustiveness for tuple literal with bool and underscore at second position checks exhaustiveness for tuple literal with bool and underscore at second position - checks exhaustiveness for tuple literal with bool and underscore at second position checks exhaustiveness for tuple literal with bool and underscore at second position - checks exhaustiveness, covers in base type covers (generic type) checks exhaustiveness, covers in base type covers (generic type) - checks exhaustiveness of enum through method (all cases covered) checks exhaustiveness of enum through method (all cases covered) - covers all types covers all types - checks exhaustiveness of nilable type with nil literal checks exhaustiveness of nilable type with nil literal - errors if casing against a constant errors if casing against a constant - can't prove case is exhaustive for @[Flags] enum can't prove case is exhaustive for @[Flags] enum - checks exhaustiveness of bool type (missing false) checks exhaustiveness of bool type (missing false) - checks exhaustiveness of union type with virtual type checks exhaustiveness of union type with virtual type - can prove case is exhaustive for @[Flags] enum when matching type can prove case is exhaustive for @[Flags] enum when matching type - checks exhaustiveness for tuple literal with bool and underscore at first position checks exhaustiveness for tuple literal with bool and underscore at first position - checks exhaustiveness for tuple literal of 3 elements, all bool checks exhaustiveness for tuple literal of 3 elements, all bool - checks exhaustiveness of bool type with other types checks exhaustiveness of bool type with other types - checks exhaustiveness of nil type with nil literal checks exhaustiveness of nil type with nil literal - doesn't check exhaustiveness when using 'when' doesn't check exhaustiveness when using 'when' - checks exhaustiveness for tuple literal with types and underscore at first position checks exhaustiveness for tuple literal with types and underscore at first position - checks exhaustiveness of single type checks exhaustiveness of single type - checks exhaustiveness, covers in base type covers checks exhaustiveness, covers in base type covers - checks exhaustiveness for tuple literal with bool and underscore at first position, with partial match checks exhaustiveness for tuple literal with bool and underscore at first position, with partial match - checks exhaustiveness of enum combined with another type checks exhaustiveness of enum combined with another type - checks exhaustiveness of enum via const checks exhaustiveness of enum via const - checks exhaustiveness of single type (T.class) checks exhaustiveness of single type (T.class) - checks exhaustiveness of enum (all cases covered) checks exhaustiveness of enum (all cases covered) - checks exhaustiveness of single type (Foo(T).class) checks exhaustiveness of single type (Foo(T).class) - checks exhaustiveness for tuple literal with bool and underscore at second position, with partial match checks exhaustiveness for tuple literal with bool and underscore at second position, with partial match - checks exhaustiveness for tuple literal, with call checks exhaustiveness for tuple literal, with call -Code gen: and - codegens and with bool union as left node 3 codegens and with bool union as left node 3 - codegens and with primitive type other than bool with union codegens and with primitive type other than bool with union - codegens and with primitive type other than bool codegens and with primitive type other than bool - codegens and with bool true and false codegens and with bool true and false - codegens and with bool union as left node 1 codegens and with bool union as left node 1 - codegens and with bool and int 1 codegens and with bool and int 1 - codegens and with bool union as left node 3 codegens and with bool union as left node 3 - codegens and with nil union as left node 1 codegens and with nil union as left node 1 - codegens and with non-false union as left node codegens and with non-false union as left node - codegens and with bool union as left node 2 codegens and with bool union as left node 2 - codegens and with bool union as left node 2 codegens and with bool union as left node 2 - codegens and with nilable as left node 2 codegens and with nilable as left node 2 - codegens and with bool false and true codegens and with bool false and true - codegens assign in right node, after must be nilable codegens assign in right node, after must be nilable - codegens and with primitive type other than bool codegens and with primitive type other than bool - codegens assign in right node, after if must be nilable codegens assign in right node, after if must be nilable - codegens and with nilable as left node 1 codegens and with nilable as left node 1 - codegens assign in right node, inside if must not be nil codegens assign in right node, inside if must not be nil - codegens and with bool union as left node 4 codegens and with bool union as left node 4 - codegens and with bool union as left node 1 codegens and with bool union as left node 1 - codegens and with bool false and false codegens and with bool false and false - codegens and with bool and int 2 codegens and with bool and int 2 - codegens and with nil union as left node 2 codegens and with nil union as left node 2 - codegens and with bool true and true codegens and with bool true and true -Code gen: C ABI - passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) passes struct after many other args when returning a large struct (sret return type) - promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) promotes variadic args (i16 to i32) (#9742) - promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) promotes variadic args (i8 to i32) (#9742) - returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret - accepts large struct in a callback (for real) accepts large struct in a callback (for real) accepts large struct in a callback (for real) accepts large struct in a callback (for real) accepts large struct in a callback (for real) accepts large struct in a callback (for real) accepts large struct in a callback (for real) accepts large struct in a callback (for real) accepts large struct in a callback (for real) accepts large struct in a callback (for real) - passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) passes struct less than 64 bits (for real) - passes struct after many other args (for real) passes struct after many other args (for real) passes struct after many other args (for real) passes struct after many other args (for real) passes struct after many other args (for real) passes struct after many other args (for real) passes struct after many other args (for real) passes struct after many other args (for real) passes struct after many other args (for real) passes struct after many other args (for real) - returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) returns struct between 64 and 128 bits (for real) - promotes variadic args (float to double) promotes variadic args (float to double) promotes variadic args (float to double) promotes variadic args (float to double) promotes variadic args (float to double) promotes variadic args (float to double) promotes variadic args (float to double) promotes variadic args (float to double) promotes variadic args (float to double) promotes variadic args (float to double) - promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) promotes variadic args (u8 to i32) (#9742) - promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) promotes variadic args (u16 to i32) (#9742) - passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) passes struct between 64 and 128 bits (for real) - returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) returns struct less than 64 bits (for real) - passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) passes struct bigger than 128 bits (for real) -Semantic: enum - disallows All value for @[Flags] enum disallows All value for @[Flags] enum - gives error on unsigned flags enum overflow after a member with value gives error on unsigned flags enum overflow after a member with value - errors if enum value is too big for type (#678) errors if enum value is too big for type (#678) - errors if reopening enum with different base type (1) errors if reopening enum with different base type (1) - types enum value types enum value - doesn't error when defining a non-flags enum with None or All doesn't error when defining a non-flags enum with None or All - defines class method on enum defines class method on enum - doesn't break assigned values in enum flags when a member has value 0 (#5767) doesn't break assigned values in enum flags when a member has value 0 (#5767) - errors if using a name twice errors if using a name twice - gives error on enum overflow gives error on enum overflow - errors if declaring type inside enum (#3127) errors if declaring type inside enum (#3127) - can use macro for inside enum can use macro for inside enum - types enum types enum - doesn't overflow on flags member (#7877) doesn't overflow on flags member (#7877) - errors if reopen and tries to define constant errors if reopen and tries to define constant - defines method on enum defines method on enum - errors if defining initialize in Enum (#7238) errors if defining initialize in Enum (#7238) - reopens an enum reopens an enum - can redefine Enum.new can redefine Enum.new - gives error on flags enum overflow gives error on flags enum overflow - errors if declaring type inside enum, nested (#3127) errors if declaring type inside enum, nested (#3127) - doesn't visit enum members generated by macros twice (#10104) doesn't visit enum members generated by macros twice (#10104) - errors if invoking private enum method errors if invoking private enum method - errors if reopen but not enum errors if reopen but not enum - gives error on signed flags enum overflow after a member with value gives error on signed flags enum overflow after a member with value - adds docs to helper methods adds docs to helper methods - gives error on enum overflow after a member with value gives error on enum overflow after a member with value - creates enum from value creates enum from value - doesn't error when defining a flags enum in a lib with None or All doesn't error when defining a flags enum in a lib with None or All - errors if inheriting Enum (#3592) errors if inheriting Enum (#3592) - errors if using instance var inside enum (#991) errors if using instance var inside enum (#991) - marks helper methods with `:nodoc:` if the member is `:nodoc:` marks helper methods with `:nodoc:` if the member is `:nodoc:` - finds method in enum type finds method in enum type - errors on enum without members (#3447) errors on enum without members (#3447) - can use macro expression inside enum can use macro expression inside enum - errors if reopening enum with different base type (2) errors if reopening enum with different base type (2) - disallows implicit conversion of int to enum disallows implicit conversion of int to enum - reopens enum without base type (2) reopens enum without base type (2) - reopens enum without base type (1) reopens enum without base type (1) - disallows redefining None to non-0 for @[Flags] enum disallows redefining None to non-0 for @[Flags] enum - has All value when defined as @[Flags] has All value when defined as @[Flags] - allows class vars in enum allows class vars in enum - doesn't error when defining a method for an enum with flags doesn't error when defining a method for an enum with flags - has None value when defined as @[Flags] has None value when defined as @[Flags] - reopens enum with same base type (1) reopens enum with same base type (1) - marks as flags with base type (#2185) marks as flags with base type (#2185) - finds class method in enum type finds class method in enum type - allows redefining None to 0 for @[Flags] enum allows redefining None to 0 for @[Flags] enum - attaches annotation to enum method (#6690) attaches annotation to enum method (#6690) - reopens enum with same base type (2) reopens enum with same base type (2) - doesn't overflow when going from negative to zero (#7874) doesn't overflow when going from negative to zero (#7874) -Code gen: op assign - evaluates exps once, [] (#3398) evaluates exps once, [] (#3398) - evaluates exps once (#3398) evaluates exps once (#3398) -Crystal::Doc::Method - doc - gets doc from underlying method gets doc from underlying method - trailing comment is not a doc comment trailing comment is not a doc comment - inherits doc from ancestor (no extra comment) inherits doc from ancestor (no extra comment) - inherits doc from previous def (no extra comment) inherits doc from previous def (no extra comment) - inherits doc from ancestor (use :inherit: plus more content) inherits doc from ancestor (use :inherit: plus more content) - trailing comment is not part of a doc comment trailing comment is not part of a doc comment - inherits doc from ancestor (use :inherit:) inherits doc from ancestor (use :inherit:) - args_to_s - shows block args shows block args - shows args and return type restriction shows args and return type restriction - shows simple args shows simple args - shows double splat args shows double splat args - shows block args with underscore shows block args with underscore - shows typeof restriction of arg with highlighting shows typeof restriction of arg with highlighting - shows underscore restriction shows underscore restriction - shows block args if a def has `yield` shows block args if a def has `yield` - shows default value of arg with highlighting shows default value of arg with highlighting - shows return type restriction shows return type restriction - shows external name of arg shows external name of arg - shows external name of arg with quotes and escaping shows external name of arg with quotes and escaping - shows splat args shows splat args -Code gen: offsetof - returns offset of `StaticArray#@buffer` returns offset of `StaticArray#@buffer` - returns offset allowing manual access of tuple items returns offset allowing manual access of tuple items - returns offset allowing manual access of class field that isn't first returns offset allowing manual access of class field that isn't first - returns offset of extern union returns offset of extern union - returns offset allowing manual access of first struct field returns offset allowing manual access of first struct field - returns offset allowing manual access of struct field that isn't first returns offset allowing manual access of struct field that isn't first - returns offset allowing manual access of first class field returns offset allowing manual access of first class field -Semantic: external/internal - overloads based on external name (#2610) overloads based on external name (#2610) - can call with external name and use with internal can call with external name and use with internal - can call positionally can call positionally - macros - can call with external name and use with internal, after splat can call with external name and use with internal, after splat - can call positionally can call positionally - can call with external name and use with internal can call with external name and use with internal - can call with external name and use with internal, after splat can call with external name and use with internal, after splat -Crystal::Repl::Interpreter - symbol - Symbol#to_s Symbol#to_s - symbol equality symbol equality - Symbol#to_i Symbol#to_i -Semantic: private - doesn't find private class from outside namespace doesn't find private class from outside namespace - doesn't define private alias with global type name doesn't define private alias with global type name - doesn't define incorrect type in top-level namespace (#13511) doesn't define incorrect type in top-level namespace (#13511) - finds private def in same file finds private def in same file - doesn't find private lib from outside namespace, long name (#8831) doesn't find private lib from outside namespace, long name (#8831) - doesn't find private module defined through macro (#8715) doesn't find private module defined through macro (#8715) - doesn't find private constant from outside namespace doesn't find private constant from outside namespace - doesn't define private enum with global type name doesn't define private enum with global type name - doesn't find private class defined through macro (#8715) doesn't find private class defined through macro (#8715) - doesn't inherit visibility from class node in macro hook (#8794) doesn't inherit visibility from class node in macro hook (#8794) - doesn't find private alias from outside namespace doesn't find private alias from outside namespace - doesn't find private enum from outside namespace, long name (#8831) doesn't find private enum from outside namespace, long name (#8831) - finds private type from inside namespace in subclass finds private type from inside namespace in subclass - doesn't find private class in another file doesn't find private class in another file - can use types in private type can use types in private type - doesn't find private constant from outside namespace, long name (#8831) doesn't find private constant from outside namespace, long name (#8831) - doesn't define incorrect type in top-level namespace (#13511) doesn't define incorrect type in top-level namespace (#13511) - doesn't find private thing defined through recursive macro (#8715) doesn't find private thing defined through recursive macro (#8715) - doesn't find private enum from outside namespace doesn't find private enum from outside namespace - doesn't define private lib with global type name doesn't define private lib with global type name - finds private macro in same file, invoking from another macro (#1265) finds private macro in same file, invoking from another macro (#1265) - find module private macro inside the module find module private macro inside the module - doesn't find private def in another file doesn't find private def in another file - types private def correctly types private def correctly - find module private macro inside a module, which is inherited by the module find module private macro inside a module, which is inherited by the module - doesn't define incorrect type in top-level namespace (#13511) doesn't define incorrect type in top-level namespace (#13511) - can use instance var initializer in private type can use instance var initializer in private type - doesn't define incorrect type in top-level namespace (#13511) doesn't define incorrect type in top-level namespace (#13511) - gives private constant error in macro gives private constant error in macro - finds private def in same file that invokes another def finds private def in same file that invokes another def - doesn't find private constant in another file (#7850) doesn't find private constant in another file (#7850) - can use class var initializer in private type can use class var initializer in private type - doesn't find private alias in another file doesn't find private alias in another file - doesn't define incorrect type in top-level namespace (#13511) doesn't define incorrect type in top-level namespace (#13511) - doesn't define private module with global type name doesn't define private module with global type name - doesn't find private alias from outside namespace, long name (#8831) doesn't find private alias from outside namespace, long name (#8831) - finds private type in same file finds private type in same file - doesn't find private macro in another file doesn't find private macro in another file - doesn't find private module from outside namespace doesn't find private module from outside namespace - doesn't define private constant with global type name doesn't define private constant with global type name - finds private class in macro expansion finds private class in macro expansion - finds private type from inside namespace finds private type from inside namespace - doesn't define private class with global type name doesn't define private class with global type name - finds private def when invoking from inside macro (#2082) finds private def when invoking from inside macro (#2082) - doesn't find private module from outside namespace, long name (#8831) doesn't find private module from outside namespace, long name (#8831) - doesn't define incorrect type in top-level namespace (#13511) doesn't define incorrect type in top-level namespace (#13511) - doesn't find private class from outside namespace, long name (#8831) doesn't find private class from outside namespace, long name (#8831) - doesn't find private macro defined through macro (#8715) doesn't find private macro defined through macro (#8715) - doesn't find private lib from outside namespace doesn't find private lib from outside namespace - finds private macro in same file finds private macro in same file - doesn't find private def defined in macro in another file (#7681) doesn't find private def defined in macro in another file (#7681) - doesn't find module private macro outside the module doesn't find module private macro outside the module -Semantic: new - errors if using self call in default argument (3) errors if using self call in default argument (3) - evaluates initialize default value at the instance scope (2) (#731) evaluates initialize default value at the instance scope (2) (#731) - evaluates initialize default value at the instance scope (3) (#731) evaluates initialize default value at the instance scope (3) (#731) - errors if using self call in default argument (1) errors if using self call in default argument (1) - evaluates initialize default value at the instance scope (1) (#731) evaluates initialize default value at the instance scope (1) (#731) - evaluates initialize default value at the instance scope (6) (#731) evaluates initialize default value at the instance scope (6) (#731) - errors if using self call in default argument (2) errors if using self call in default argument (2) - evaluates initialize default value at the instance scope (4) (#731) evaluates initialize default value at the instance scope (4) (#731) - doesn't incorrectly redefines new for generic class doesn't incorrectly redefines new for generic class - doesn't have default new for inherited class from generic type doesn't have default new for inherited class from generic type - evaluates initialize default value at the instance scope (5) (#731) evaluates initialize default value at the instance scope (5) (#731) - inherits initialize and new methods if doesn't define new (#3238) inherits initialize and new methods if doesn't define new (#3238) - uses correct receiver for `initialize` in namespaced generic classes (#4086) uses correct receiver for `initialize` in namespaced generic classes (#4086) -Semantic: if - restricts and doesn't unify union types restricts and doesn't unify union types - doesn't restrict || else in sub && (right) doesn't restrict || else in sub && (right) - restricts && else in sub && (left) restricts && else in sub && (left) - doesn't restrict with || on different vars doesn't restrict with || on different vars - restricts with && always falsey restricts with && always falsey - restricts with || (#2464) restricts with || (#2464) - restricts type with !var and || restricts type with !var and || - doesn't fail on new variables inside typeof condition doesn't fail on new variables inside typeof condition - restricts && of !var.is_a(...) restricts && of !var.is_a(...) - doesn't consider nil type in else branch with if with && (#7434) doesn't consider nil type in else branch with if with && (#7434) - types an if with else of different type types an if with else of different type - restricts && else in sub && (right) restricts && else in sub && (right) - restricts the type of the right hand side of an || when using is_a? (#1728) restricts the type of the right hand side of an || when using is_a? (#1728) - includes pointer types in falsey branch includes pointer types in falsey branch - types variable after unreachable else of && (#3360) types variable after unreachable else of && (#3360) - restricts with || but doesn't unify types to base class restricts with || but doesn't unify types to base class - restricts || else in sub || (left) restricts || else in sub || (left) - errors if requires inside if errors if requires inside if - passes bug (related to #1729) passes bug (related to #1729) - types `if` with `&&` and assignment types `if` with `&&` and assignment - doesn't restrict with || on var and non-restricting condition doesn't restrict with || on var and non-restricting condition - doesn't fail on Expressions condition (2) doesn't fail on Expressions condition (2) - restricts type with !var.is_a?(...) and && restricts type with !var.is_a?(...) and && - restricts || else in sub || (right) restricts || else in sub || (right) - doesn't filter and recombine when variables don't change in if doesn't filter and recombine when variables don't change in if - restricts || of more than 2 clauses (#8864) restricts || of more than 2 clauses (#8864) - doesn't fail on nested conditionals inside typeof condition doesn't fail on nested conditionals inside typeof condition - doesn't fail on Expressions condition (1) doesn't fail on Expressions condition (1) - restricts || else (2) (#3266) restricts || else (2) (#3266) - restricts type with !var.is_a?(...) and || restricts type with !var.is_a?(...) and || - correctly filters type of variable if there's a raise with an interpolation that can't be typed correctly filters type of variable if there's a raise with an interpolation that can't be typed - doesn't restrict || else in sub && (left) doesn't restrict || else in sub && (left) - restricts || else (3) (#3266) restricts || else (3) (#3266) - can invoke method on var that is declared on the right hand side of an and can invoke method on var that is declared on the right hand side of an and - restricts || else (1) (#3266) restricts || else (1) (#3266) - types an if with else of same type types an if with else of same type - types an if without else types an if without else -Crystal::Repl::Interpreter - instance_sizeof - interprets instance_sizeof typeof interprets instance_sizeof typeof - sizeof - interprets sizeof typeof interprets sizeof typeof - instance_alignof - interprets instance_alignof typeof interprets instance_alignof typeof - alignof - interprets alignof typeof interprets alignof typeof -Semantic: not - types not as NoReturn if exp is NoReturn types not as NoReturn if exp is NoReturn - filters types inside if/else filters types inside if/else - types not types not - filters types inside if filters types inside if - doesn't restrict and in while (#4243) doesn't restrict and in while (#4243) - doesn't restrict and doesn't restrict and - filters types with !is_a? filters types with !is_a? -implementations - can display json output can display json output - find module implementation find module implementation - find enum implementation find enum implementation - find implementation in generic class methods find implementation in generic class methods - find implementors of different classes find implementors of different classes - find struct implementation find struct implementation - find method calls inside while cond find method calls inside while cond - find implementation from macro expansions find implementation from macro expansions - find class inside method find class inside method - find method calls inside rescue find method calls inside rescue - find implementation inside contained file private class' class method find implementation inside contained file private class' class method - find class defined by macro find class defined by macro - find const implementation find const implementation - find method calls inside trailing if find method calls inside trailing if - find implementation inside contained file private method find implementation inside contained file private method - find method calls inside while find method calls inside while - find method calls inside if find method calls inside if - find implementation inside a module class find implementation inside a module class - find top level method calls find top level method calls - find implementors of classes that are only used find implementors of classes that are only used - find implementation on def with no location find implementation on def with no location - find class implementation find class implementation - find full trace for macro expansions find full trace for macro expansions - find open class implementation find open class implementation - find implementation inside contained class' class method find implementation inside contained class' class method - find implementation in class methods find implementation in class methods - find implementation in generic class find implementation in generic class - can display text output can display text output - find alias implementation find alias implementation - find enum value implementation find enum value implementation -Code gen: next - codegens next with break (1) codegens next with break (1) - codegens next without expressions codegens next without expressions - codegens next codegens next - codegens next with break (2) codegens next with break (2) - codegens next conditionally with int type (2) codegens next conditionally with int type (2) - codegens next with while inside block codegens next with while inside block - codegens next conditionally codegens next conditionally - codegens next with break (3) codegens next with break (3) -Code gen: method_missing - does method_missing macro with block but not using it does method_missing macro with block but not using it - does method_missing macro with included module does method_missing macro with included module - does method_missing generating method does method_missing generating method - does method_missing macro with virtual type (6) does method_missing macro with virtual type (6) - does method_missing macro with virtual type (4) does method_missing macro with virtual type (4) - does method_missing macro with args does method_missing macro with args - works with named arguments (#3654) works with named arguments (#3654) - finds method_missing with 'with ... yield' finds method_missing with 'with ... yield' - does method_missing with assignment (bug) does method_missing with assignment (bug) - does method_missing macro with virtual type (1) does method_missing macro with virtual type (1) - does method_missing macro with block does method_missing macro with block - does method_missing macro without args does method_missing macro without args - does method_missing macro without args (with call) does method_missing macro without args (with call) - does method_missing macro with virtual type (8) does method_missing macro with virtual type (8) - does method_missing macro with module involved does method_missing macro with module involved - works with named arguments that aren't legal variable names (#10381) works with named arguments that aren't legal variable names (#10381) - does method_missing macro with args (with call) does method_missing macro with args (with call) - does method_missing macro with virtual type (5) does method_missing macro with virtual type (5) - forwards forwards - does method_missing macro with virtual type (3) does method_missing macro with virtual type (3) - does method_missing macro with virtual type (7) does method_missing macro with virtual type (7) - does method_missing macro with top level method involved does method_missing macro with top level method involved - does method_missing macro with virtual type (2) does method_missing macro with virtual type (2) - does method_missing with assignment (2) (bug) does method_missing with assignment (2) (bug) -Code gen: C ABI x86_64 - passes struct bigger than128 bits with byval passes struct bigger than128 bits with byval - returns struct between 64 and 128 bits as { i64, i64 } returns struct between 64 and 128 bits as { i64, i64 } - returns struct bigger than 128 bits with sret returns struct bigger than 128 bits with sret - returns struct less than 64 bits as { i64 } returns struct less than 64 bits as { i64 } - passes struct between 64 and 128 bits as { i64, i64 } (with multiple modules/contexts) passes struct between 64 and 128 bits as { i64, i64 } (with multiple modules/contexts) - passes struct between 64 and 128 bits as { i64, i64 } passes struct between 64 and 128 bits as { i64, i64 } - passes struct less than 64 bits as { i64 } in varargs passes struct less than 64 bits as { i64 } in varargs - passes struct less than 64 bits as { i64 } passes struct less than 64 bits as { i64 } -Crystal::Repl::Interpreter - special vars - does special var that's a struct does special var that's a struct - does special var that's a reference does special var that's a reference - does special var that's a reference for multidispatch does special var that's a reference for multidispatch - does special var that's a reference inside block does special var that's a reference inside block - does special var that's a reference when there are optional arguments does special var that's a reference when there are optional arguments - sets special var inside call inside block (#12250) sets special var inside call inside block (#12250) -Normalize: range literal - normalizes not exclusive normalizes not exclusive - normalizes exclusive normalizes exclusive -Crystal::TablePrint - rows with horizontal separators rows with horizontal separators - colspan a cell that fits the available size colspan a cell that fits the available size - multiple rows with separator multiple rows with separator - single row with separator single row with separator - aligns columns borders aligns columns borders - aligns cell content aligns cell content - single cell single cell -Semantic: named args - doesn't include arguments with default values in missing arguments error doesn't include arguments with default values in missing arguments error - gives correct error message for missing args after * gives correct error message for missing args after * - matches specific overload with named arguments (2) (#2753) matches specific overload with named arguments (2) (#2753) - errors if named arg matches splat argument errors if named arg matches splat argument - passes #2696 passes #2696 - errors if named arg not found errors if named arg not found - allows named arg if there's a splat allows named arg if there's a splat - errors if doesn't pass named arg restriction errors if doesn't pass named arg restriction - doesn't fail on named argument with NoReturn type (#7760) doesn't fail on named argument with NoReturn type (#7760) - sends one regular argument as named argument sends one regular argument as named argument - errors if missing one argument errors if missing one argument - uses bare splat in new uses bare splat in new - says no overload matches with named arg says no overload matches with named arg - errors if named arg already specified, but multiple overloads (#7281) errors if named arg already specified, but multiple overloads (#7281) - sends two regular arguments as named arguments sends two regular arguments as named arguments - errors if named arg matches single splat argument errors if named arg matches single splat argument - matches specific overload with named arguments (#2753) matches specific overload with named arguments (#2753) - errors if named arg already specified but in same position errors if named arg already specified but in same position - sends two regular arguments as named arguments in inverted position (2) sends two regular arguments as named arguments in inverted position (2) - errors if named arg already specified errors if named arg already specified - errors if missing two arguments errors if missing two arguments - says correct error when forwarding named args (#7491) says correct error when forwarding named args (#7491) - overloads based on required named args overloads based on required named args - gives correct error message with external names (#3934) gives correct error message with external names (#3934) - errors if named arg already specified errors if named arg already specified - sends two regular arguments as named arguments in inverted position (1) sends two regular arguments as named arguments in inverted position (1) - overloads based on required named args, with restrictions overloads based on required named args, with restrictions - errors if named arg not found in new errors if named arg not found in new -Lexer comments - lexes correct number of spaces lexes correct number of spaces - lexes without comments enabled lexes without comments enabled - lexes with comments enabled (2) lexes with comments enabled (2) - lexes with comments enabled lexes with comments enabled -Semantic: uninitialized - disallows declaring var of type Float disallows declaring var of type Float - errors if declaring generic type without type vars (with instance var) errors if declaring generic type without type vars (with instance var) - disallows declaring var of type Enum disallows declaring var of type Enum - works with uninitialized NoReturn (#3314) works with uninitialized NoReturn (#3314) - errors if declares var and then assigns other type errors if declares var and then assigns other type - uses virtual type for uninitialized (#8216) uses virtual type for uninitialized (#8216) - disallows declaring var of type Struct disallows declaring var of type Struct - disallows declaring var of type Class disallows declaring var of type Class - can uninitialize variable outside initialize (#2828) can uninitialize variable outside initialize (#2828) - disallows declaring var of type Number disallows declaring var of type Number - declares as uninitialized and reads it declares as uninitialized and reads it - can use uninitialized with class type (#2940) can use uninitialized with class type (#2940) - disallows declaring var of type Value disallows declaring var of type Value - disallows declaring var of type Object disallows declaring var of type Object - errors if declaring generic type without type vars (with class var) errors if declaring generic type without type vars (with class var) - can uninitialize variable outside initialize, generic (#2828) can uninitialize variable outside initialize, generic (#2828) - errors if declaring variable multiple times with different types (#917) errors if declaring variable multiple times with different types (#917) - disallows declaring var of type Int disallows declaring var of type Int - declares as uninitialized declares as uninitialized - declares an instance variable in initialize as uninitialized declares an instance variable in initialize as uninitialized - disallows declaring var of type Reference disallows declaring var of type Reference - has type (#3641) has type (#3641) -Crystal::Repl::Interpreter - unions - converts from NilableType to NonGenericClassType converts from NilableType to NonGenericClassType - put and remove from union, together with is_a? (falsey case) put and remove from union, together with is_a? (falsey case) - puts union inside union puts union inside union - put and remove from union in instance var put and remove from union in instance var - put and remove from union, together with is_a? (truthy case) put and remove from union, together with is_a? (truthy case) - returns union type returns union type - returns large union type (#15041) returns large union type (#15041) - put and remove from union in local var put and remove from union in local var - discards is_a? discards is_a? -Code gen: return - codegens return inside if codegens return inside if - codegens return codegens return - return from function with nilable type 2 return from function with nilable type 2 - doesn't crash when method returns nil and can be inlined doesn't crash when method returns nil and can be inlined - returns in var assignment (#3364) returns in var assignment (#3364) - flattens splats inside multiple return values flattens splats inside multiple return values - codegens return followed by another expression codegens return followed by another expression - returns empty from function returns empty from function - codegens bug with return if true codegens bug with return if true - forms a tuple from multiple return values forms a tuple from multiple return values - return union return union - return from function with union type return from function with union type - return from function with nilable type return from function with nilable type - codegens assign with if with two returns codegens assign with if with two returns -Visibility modifiers - errors if applying visibility modifier to non-def or non-call errors if applying visibility modifier to non-def or non-call - errors if invoking protected method from top-level errors if invoking protected method from top-level - allows setting visibility modifier to macro that generates many methods (1) allows setting visibility modifier to macro that generates many methods (1) - automatically makes initialize be protected automatically makes initialize be protected - allows invoking protected method from namespaced type to namespace allows invoking protected method from namespaced type to namespace - disallows invoking private method disallows invoking private method - allows setting visibility modifier to macro that generates many methods (2) allows setting visibility modifier to macro that generates many methods (2) - allows calling protected method from nested generic class (2) allows calling protected method from nested generic class (2) - allows invoking protected method from subclass allows invoking protected method from subclass - allows invoking protected method from subclass (2) allows invoking protected method from subclass (2) - handles virtual types (#8561) handles virtual types (#8561) - defines protected initialize (#7501) defines protected initialize (#7501) - allows invoking protected method between types in the same namespace allows invoking protected method between types in the same namespace - allows setting visibility modifier to macro allows setting visibility modifier to macro - allows invoking private setter with self allows invoking private setter with self - gives correct error on unknown call (#2838) gives correct error on unknown call (#2838) - allows invoking protected method from the same class allows invoking protected method from the same class - errors if invoking protected method from non-subclass errors if invoking protected method from non-subclass - allows invoking protected from instance to class allows invoking protected from instance to class - allows invoking protected method from virtual type allows invoking protected method from virtual type - allows invoking protected method between types in the same namespace when inheriting allows invoking protected method between types in the same namespace when inheriting - errors if invoking protected method from non-subclass, generated with macro that generates a macro errors if invoking protected method from non-subclass, generated with macro that generates a macro - allows invoking private method from the same class allows invoking private method from the same class - allows calling protected method from nested generic class (1) allows calling protected method from nested generic class (1) - allows invoking protected method from namespace to namespaced type allows invoking protected method from namespace to namespaced type -Semantic: macro overload - doesn't overwrite last macro definition if named args differs doesn't overwrite last macro definition if named args differs -Semantic: array - assignment in array literal works (#3195) assignment in array literal works (#3195) - types array literal size correctly types array literal size correctly - types array literal with splats (2) types array literal with splats (2) - types array literal of int types array literal of int - types array literal with splats types array literal with splats - types non-empty typed array literal of int types non-empty typed array literal of int - types empty typed array literal of int32 types empty typed array literal of int32 - types non-empty typed array literal of int types non-empty typed array literal of int - types array literal of int with splats types array literal of int with splats - types array literal of union types array literal of union -Crystal::Repl - can parse and evaluate snippets can parse and evaluate snippets - can return static and runtime type information for - MixedUnionType MixedUnionType - UnionType UnionType - VirtualType VirtualType - Non Union Non Union -Code gen: debug - doesn't fail if no top-level code follows discarded class var initializer (#15970) doesn't fail if no top-level code follows discarded class var initializer (#15970) - stores and restores debug location after jumping to main (2) stores and restores debug location after jumping to main (2) - codegens correct debug info for untyped expression (#4007 and #4008) codegens correct debug info for untyped expression (#4007 and #4008) - doesn't emit incorrect debug info for closured self doesn't emit incorrect debug info for closured self - doesn't emit debug info for unused variable declarations (#9882) doesn't emit debug info for unused variable declarations (#9882) - doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals doesn't fail on splat expansions inside array-like literals - codegens lib union (#7335) codegens lib union (#7335) - stores and restores debug location after jumping to main (#6920) stores and restores debug location after jumping to main (#6920) - stores and restores debug location after jumping to main (3) stores and restores debug location after jumping to main (3) - doesn't fail on constant read calls (#11416) doesn't fail on constant read calls (#11416) - doesn't fail if class var initializer is followed by metaclass (#15970) doesn't fail if class var initializer is followed by metaclass (#15970) - has debug info in closure inside if (#5593) has debug info in closure inside if (#5593) - codegens correct debug info for new with custom allocate (#3945) codegens correct debug info for new with custom allocate (#3945) - correctly restores debug location after fun change (#4254) correctly restores debug location after fun change (#4254) - codegens abstract struct (#3578) codegens abstract struct (#3578) - inlines instance var access through getter in debug mode inlines instance var access through getter in debug mode - codegens extern union (#7335) codegens extern union (#7335) - has correct debug location after constant initialization in call with block (#4719) has correct debug location after constant initialization in call with block (#4719) -Code gen: regex literal spec - works in a class variable (#10951) works in a class variable (#10951) works in a class variable (#10951) works in a class variable (#10951) works in a class variable (#10951) works in a class variable (#10951) works in a class variable (#10951) works in a class variable (#10951) works in a class variable (#10951) works in a class variable (#10951) -Crystal::JSONHierarchyPrinter - shows extern unions shows extern unions - works works -Codegen: fun - sets external linkage by default sets external linkage by default - defines same fun 3 or more times (#15523) defines same fun 3 or more times (#15523) - sets internal linkage to __crystal_ funs when compiling to single module sets internal linkage to __crystal_ funs when compiling to single module -Crystal::ABI::X86 - align - for integer for integer - for packed struct for packed struct - for pointer for pointer - for struct for struct - for array for array - for float for float - for double for double - abi_info - does with primitives does with primitives - does with structs between 64 and 128 bits does with structs between 64 and 128 bits - does with structs less than 64 bits does with structs less than 64 bits - does with structs between 64 and 128 bits does with structs between 64 and 128 bits - size - for array for array - for float for float - for struct for struct - for packed struct for packed struct - for integer for integer - for pointer for pointer - for double for double -View#module_name - hyphen followed by non-ascii letter is replaced by its character hyphen followed by non-ascii letter is replaced by its character - namespace is divided by hyphen namespace is divided by hyphen - underscore is ignored underscore is ignored -Lexer - lexes "0x8000000000000000" lexes "0x8000000000000000" - says syntax error on "\"\\400\"" says syntax error on "\"\\400\"" - lexes "+0b1010" lexes "+0b1010" - lexes ":[]=" lexes ":[]=" - lexes "0x3🔮" lexes "0x3🔮" - lexes "$foo" lexes "$foo" - lexes "10000000000000000000_u64" lexes "10000000000000000000_u64" - lexes "/=" lexes "/=" - lexes ":==" lexes ":==" - lexes "0x7fffffffffffffff" lexes "0x7fffffffffffffff" - lexes "::" lexes "::" - invalid byte sequence invalid byte sequence - lexes "-0xFFFFFFFF" lexes "-0xFFFFFFFF" - lexes "1E40" lexes "1E40" - lexes ":!" lexes ":!" - says syntax error on "0b_10" says syntax error on "0b_10" - lexes "-9223372036854775809_i128" lexes "-9223372036854775809_i128" - lexes "as?" lexes "as?" - lexes ":>" lexes ":>" - lexes "0o777777777777777777777" lexes "0o777777777777777777777" - lexes "fun" lexes "fun" - lexes "&*=" lexes "&*=" - lexes "of" lexes "of" - lexes "require" lexes "require" - lexes " " lexes " " - says syntax error on "4294967296_u32" says syntax error on "4294967296_u32" - lexes "&&" lexes "&&" - says syntax error on "-1_u64" says syntax error on "-1_u64" - says syntax error on "0o12345671234567_12345671234567_i8" says syntax error on "0o12345671234567_12345671234567_i8" - says syntax error on "-0x80000000000000000000000000000000" says syntax error on "-0x80000000000000000000000000000000" - lexes "macro" lexes "macro" - lexes "bar!" lexes "bar!" - lexes "nil!" lexes "nil!" - lexes char with unicode codepoint lexes char with unicode codepoint - lexes ":^" lexes ":^" - lexes "<<" lexes "<<" - lexes "-0xFFFF" lexes "-0xFFFF" - lexes symbol with backslash (#2187) lexes symbol with backslash (#2187) - lexes "2_e2" lexes "2_e2" - lexes "0o1000000000000000000000" lexes "0o1000000000000000000000" - lexes "alias" lexes "alias" - lexes "[]=" lexes "[]=" - lexes "-" lexes "-" - lexes heredoc start lexes heredoc start - lexes __LINE__ lexes __LINE__ - lexes "+1_i64" lexes "+1_i64" - says syntax error on "'\\1'" says syntax error on "'\\1'" - lexes "1u64" lexes "1u64" - says syntax error on "01_i64" says syntax error on "01_i64" - lexes "&-=" lexes "&-=" - lexes "1.foo" lexes "1.foo" - says syntax error on "0x1afafafafafafafafafafaf" says syntax error on "0x1afafafafafafafafafafaf" - lexes "until" lexes "until" - lexes "*=" lexes "*=" - says syntax error on "4f33" says syntax error on "4f33" - lexes "yield!" lexes "yield!" - lexes "0xFFFF_u64" lexes "0xFFFF_u64" - lexes "self" lexes "self" - lexes "2147483648" lexes "2147483648" - lexes "!@foo" lexes "!@foo" - says syntax error on "/foo" says syntax error on "/foo" - lexes "as" lexes "as" - lexes "+0xFFFF" lexes "+0xFFFF" - lexes "-@foo" lexes "-@foo" - lexes "," lexes "," - lexes "0x100000000" lexes "0x100000000" - lexes "}" lexes "}" - lexes "+0" lexes "+0" - lexes regex after \n lexes regex after \n - says syntax error on "-1_u8" says syntax error on "-1_u8" - lexes float then zero (bug) lexes float then zero (bug) - lexes '\'' lexes '\'' - lexes "0xFFFF" lexes "0xFFFF" - lexes "1_i8" lexes "1_i8" - says syntax error on "0x10000_0000_0000_0000" says syntax error on "0x10000_0000_0000_0000" - lexes "class" lexes "class" - lexes "0xabcdef" lexes "0xabcdef" - lexes "-0b1010" lexes "-0b1010" - lexes "1f64" lexes "1f64" - lexes "$23?" lexes "$23?" - lexes "0x80000001" lexes "0x80000001" - lexes ";" lexes ";" - says syntax error on "'\\uD800'" says syntax error on "'\\uD800'" - lexes ")" lexes ")" - lexes "pointerof" lexes "pointerof" - lexes '\v' lexes '\v' - says syntax error on "-9223372036854775809" says syntax error on "-9223372036854775809" - lexes "class?" lexes "class?" - lexes "0i32" lexes "0i32" - lexes "0o001777777777777777777777" lexes "0o001777777777777777777777" - lexes "1234" lexes "1234" - lexes ":*" lexes ":*" - says syntax error on "4u22" says syntax error on "4u22" - lexes "{%" lexes "{%" - says syntax error on "0x8000000000000000i64" says syntax error on "0x8000000000000000i64" - lexes "^=" lexes "^=" - lexes ":&*" lexes ":&*" - lexes "ident" lexes "ident" - lexes '\t' lexes '\t' - lexes "begin" lexes "begin" - lexes "0x10000_0000_0000_0000_i128" lexes "0x10000_0000_0000_0000_i128" - lexes ":>=" lexes ":>=" - lexes "18446744073709551616_u128" lexes "18446744073709551616_u128" - says syntax error on "10e_10" says syntax error on "10e_10" - lexes "[]" lexes "[]" - lexes "1e-23" lexes "1e-23" - says syntax error on "0o200000_00000000_00000000" says syntax error on "0o200000_00000000_00000000" - lexes "0o17777777777" lexes "0o17777777777" - lexes "protected" lexes "protected" - lexes "nil" lexes "nil" - lexes "break" lexes "break" - lexes "9223372036854775808_i128" lexes "9223372036854775808_i128" - lexes "://" lexes "://" - lexes ":|" lexes ":|" - says syntax error on "0o200000_00000000_00000000_u64" says syntax error on "0o200000_00000000_00000000_u64" - lexes symbol followed by === lexes symbol followed by === - lexes "1_u8" lexes "1_u8" - says syntax error on ":\"foo" says syntax error on ":\"foo" - lexes "-9223372036854775808" lexes "-9223372036854775808" - lexes ":<<" lexes ":<<" - lexes "+1.0" lexes "+1.0" - says syntax error on "118446744073709551616_u64" says syntax error on "118446744073709551616_u64" - lexes "%=" lexes "%=" - says syntax error on "2e+_2" says syntax error on "2e+_2" - says syntax error on "0x10000_0000_0000_0000_u64" says syntax error on "0x10000_0000_0000_0000_u64" - lexes "!~" lexes "!~" - lexes ":>>" lexes ":>>" - says syntax error on "32768_i16" says syntax error on "32768_i16" - says syntax error on "4i65" says syntax error on "4i65" - lexes "+0.5" lexes "+0.5" - lexes "<" lexes "<" - lexes "1hello" lexes "1hello" - lexes "+1" lexes "+1" - lexes "0x1_i64" lexes "0x1_i64" - lexes "18446744073709551615" lexes "18446744073709551615" - lexes "_" lexes "_" - lexes "break!" lexes "break!" - lexes ":foo=" lexes ":foo=" - doesn't raise if slash r with slash n doesn't raise if slash r with slash n - lexes "||=" lexes "||=" - lexes dot and ident lexes dot and ident - lexes "out" lexes "out" - lexes "unless!" lexes "unless!" - lexes "lib" lexes "lib" - lexes "responds_to?" lexes "responds_to?" - lexes "true" lexes "true" - lexes "class!" lexes "class!" - lexes ">>=" lexes ">>=" - lexes '\n' lexes '\n' - says syntax error on "0x1afafafafafafafafafafafu64" says syntax error on "0x1afafafafafafafafafafafu64" - lexes "DžLjNjDzᾈᾉᾊ" lexes "DžLjNjDzᾈᾉᾊ" - lexes "1.2e+23_f32" lexes "1.2e+23_f32" - says syntax error on "65536_u16" says syntax error on "65536_u16" - says syntax error on "0o200_i8" says syntax error on "0o200_i8" - lexes "0o40000000000" lexes "0o40000000000" - says syntax error on "0b10000000_i8" says syntax error on "0b10000000_i8" - says syntax error on "4u3" says syntax error on "4u3" - lexes "1" lexes "1" - lexes "-0.0f32" lexes "-0.0f32" - doesn't raise if many slash r with slash n doesn't raise if many slash r with slash n - lexes "170141183460469231731687303715884105728_u128" lexes "170141183460469231731687303715884105728_u128" - lexes "1e23" lexes "1e23" - lexes "1u8" lexes "1u8" - says syntax error on "18446744073709551616_i32" says syntax error on "18446744073709551616_i32" - lexes "offsetof" lexes "offsetof" - lexes "" lexes "" - lexes "while?" lexes "while?" - lexes ".." lexes ".." - lexes ":&-" lexes ":&-" - lexes "&&=" lexes "&&=" - lexes "*" lexes "*" - says syntax error on "0xfffffffffffffffff_u64" says syntax error on "0xfffffffffffffffff_u64" - says syntax error on "4f22" says syntax error on "4f22" - lexes != after identifier (#4815) lexes != after identifier (#4815) - lexes "-0.5" lexes "-0.5" - lexes "for" lexes "for" - says syntax error on "-1_u128" says syntax error on "-1_u128" - lexes "❨╯°□°❩╯︵┻━┻" lexes "❨╯°□°❩╯︵┻━┻" - says syntax error on "18446744073709551616_u64" says syntax error on "18446744073709551616_u64" - lexes "\xFF" lexes "\xFF" - says syntax error on "\r1" says syntax error on "\r1" - lexes "1_i16" lexes "1_i16" - lexes "-1234" lexes "-1234" - lexes ":" lexes ":" - lexes "-1" lexes "-1" - lexes "instance_sizeof" lexes "instance_sizeof" - lexes "1_000" lexes "1_000" - lexes "1.0hello" lexes "1.0hello" - lexes "do!" lexes "do!" - lexes "(" lexes "(" - says syntax error on "2e" says syntax error on "2e" - lexes "$10?" lexes "$10?" - lexes "$1?" lexes "$1?" - lexes "-0x8000000000000000_i64" lexes "-0x8000000000000000_i64" - says syntax error on "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" says syntax error on "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - lexes "@@foo" lexes "@@foo" - says syntax error on "2e+f32" says syntax error on "2e+f32" - lexes "0xffff_ffff_ffff_ffff" lexes "0xffff_ffff_ffff_ffff" - lexes "12341234🔮" lexes "12341234🔮" - says syntax error on "-.42" says syntax error on "-.42" - lexes "begin!" lexes "begin!" - says syntax error on "118446744073709551616" says syntax error on "118446744073709551616" - says syntax error on "4u33" says syntax error on "4u33" - lexes ":===" lexes ":===" - says syntax error on "-0x80000000000000000000000000000001" says syntax error on "-0x80000000000000000000000000000001" - lexes "end" lexes "end" - lexes "else" lexes "else" - says syntax error on "4F64" says syntax error on "4F64" - lexes "1e23f64" lexes "1e23f64" - lexes "@foo" lexes "@foo" - lexes "||" lexes "||" - lexes "170141183460469231731687303715884105727_i128" lexes "170141183460469231731687303715884105727_i128" - says syntax error on "256_u8" says syntax error on "256_u8" - lexes "-2147483649" lexes "-2147483649" - lexes ":-" lexes ":-" - lexes "0b100000000000000000000000000000000" lexes "0b100000000000000000000000000000000" - lexes "[]?" lexes "[]?" - lexes "1u32" lexes "1u32" - says syntax error on "'\\" says syntax error on "'\\" - says syntax error on "0o40000000000i32" says syntax error on "0o40000000000i32" - lexes "-1.0f32" lexes "-1.0f32" - lexes "0xffffffff" lexes "0xffffffff" - lexes '\f' lexes '\f' - lexes "1i8" lexes "1i8" - lexes "next!" lexes "next!" - lexes "1_u128" lexes "1_u128" - says syntax error on "2e+-2" says syntax error on "2e+-2" - lexes "0b0_1" lexes "0b0_1" - lexes "1.0f32hello" lexes "1.0f32hello" - lexes "yield?" lexes "yield?" - lexes "->" lexes "->" - lexes "|" lexes "|" - says syntax error on "0x100000000i32" says syntax error on "0x100000000i32" - lexes symbol with quote lexes symbol with quote - says syntax error on "'\\u{DFFF}'" says syntax error on "'\\u{DFFF}'" - lexes "sizeof" lexes "sizeof" - lexes "==" lexes "==" - lexes "+0o123" lexes "+0o123" - lexes "\t" lexes "\t" - lexes "0x7fffffff" lexes "0x7fffffff" - lexes "9223372036854775808" lexes "9223372036854775808" - says syntax error on "9999999999999999999_i32" says syntax error on "9999999999999999999_i32" - says syntax error on "-0e_12" says syntax error on "-0e_12" - lexes "typeof" lexes "typeof" - lexes "14146167139683460000" lexes "14146167139683460000" - says syntax error on "9223372036854775808_i64" says syntax error on "9223372036854775808_i64" - lexes "ÁrvíztűrőTükörfúrógép" lexes "ÁrvíztűrőTükörfúrógép" - lexes "0o17777777777_i32" lexes "0o17777777777_i32" - lexes "if" lexes "if" - lexes "-=" lexes "-=" - says syntax error on "0o1000000000000000000000i64" says syntax error on "0o1000000000000000000000i64" - lexes "enum" lexes "enum" - lexes "&**" lexes "&**" - lexes "." lexes "." - says syntax error on "-9223372036854775809_i64" says syntax error on "-9223372036854775809_i64" - lexes "while!" lexes "while!" - says syntax error on "-9999999999999999999" says syntax error on "-9999999999999999999" - lexes "struct" lexes "struct" - lexes "$FOO" lexes "$FOO" - says syntax error on "-1_u32" says syntax error on "-1_u32" - lexes "0x00ffffffffffffffff" lexes "0x00ffffffffffffffff" - lexes "0xFFFFFFFF" lexes "0xFFFFFFFF" - says syntax error on "0o1234567123456712345671234567u64" says syntax error on "0o1234567123456712345671234567u64" - says syntax error on "\"hi\\" says syntax error on "\"hi\\" - lexes "something" lexes "something" - lexes "foo?" lexes "foo?" - lexes "in" lexes "in" - lexes "0b1_i64" lexes "0b1_i64" - lexes "<=" lexes "<=" - says syntax error on "0b100000000000000000000000000000000000000000000000000000000000000000" says syntax error on "0b100000000000000000000000000000000000000000000000000000000000000000" - lexes char with unicode codepoint and curly lexes char with unicode codepoint and curly - lexes "def!" lexes "def!" - lexes "]" lexes "]" - lexes "rescue" lexes "rescue" - lexes "Foo" lexes "Foo" - lexes '\0' lexes '\0' - says syntax error on "1__1" says syntax error on "1__1" - lexes "super" lexes "super" - says syntax error on "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" says syntax error on "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - says syntax error on "0_12" says syntax error on "0_12" - lexes "false" lexes "false" - says syntax error on "0xFF_i8" says syntax error on "0xFF_i8" - lexes "nil?" lexes "nil?" - lexes "unless?" lexes "unless?" - lexes "union" lexes "union" - says syntax error on "18446744073709551616" says syntax error on "18446744073709551616" - says syntax error on "-3_" says syntax error on "-3_" - lexes "+=" lexes "+=" - says syntax error on "\"\\xz\"" says syntax error on "\"\\xz\"" - lexes "if?" lexes "if?" - lexes "true!" lexes "true!" - says syntax error on "2e+@foo" says syntax error on "2e+@foo" - says syntax error on "-170141183460469231731687303715884105729" says syntax error on "-170141183460469231731687303715884105729" - lexes "\x12" lexes "\x12" - says syntax error on "2147483648_i32" says syntax error on "2147483648_i32" - lexes "when" lexes "when" - lexes ":[]" lexes ":[]" - says syntax error on "'\\u{D800}'" says syntax error on "'\\u{D800}'" - lexes ":%" lexes ":%" - lexes "1_i64" lexes "1_i64" - says syntax error on "0o7777777777777777777777777777777777777777777777777" says syntax error on "0o7777777777777777777777777777777777777777777777777" - lexes "1.0f64" lexes "1.0f64" - lexes "1_i32" lexes "1_i32" - lexes "&=" lexes "&=" - lexes "/" lexes "/" - lexes ":**" lexes ":**" - lexes "|" lexes "|" - lexes ">=" lexes ">=" - lexes "1_i128" lexes "1_i128" - says syntax error on "\"\\x1z\"" says syntax error on "\"\\x1z\"" - lexes "0o37777777777" lexes "0o37777777777" - lexes "$10" lexes "$10" - lexes "elsif?" lexes "elsif?" - lexes "0🔮" lexes "0🔮" - lexes comment and token lexes comment and token - lexes "0_i32" lexes "0_i32" - lexes "do?" lexes "do?" - lexes ":~" lexes ":~" - lexes "340282366920938463463374607431768211455_u128" lexes "340282366920938463463374607431768211455_u128" - lexes "+1_i128" lexes "+1_i128" - says syntax error on "0b100000000000000000000000000000000i32" says syntax error on "0b100000000000000000000000000000000i32" - says syntax error on "'" says syntax error on "'" - says syntax error on "-1_u16" says syntax error on "-1_u16" - lexes "%}" lexes "%}" - says syntax error on "4F32" says syntax error on "4F32" - lexes ":foo?" lexes ":foo?" - lexes "+@foo" lexes "+@foo" - says syntax error on "-32769_i16" says syntax error on "-32769_i16" - says syntax error on "0o73_f64" says syntax error on "0o73_f64" - lexes char with unicode codepoint and curly with six hex digits lexes char with unicode codepoint and curly with six hex digits - lexes "uninitialized" lexes "uninitialized" - says syntax error on "0123" says syntax error on "0123" - lexes "ensure" lexes "ensure" - says syntax error on "1_.1" says syntax error on "1_.1" - lexes "0b001111111111111111111111111111111111111111111111111111111111111111" lexes "0b001111111111111111111111111111111111111111111111111111111111111111" - lexes "$foo123" lexes "$foo123" - says syntax error on "-0o7777777777777777777777777777777777777777777777777" says syntax error on "-0o7777777777777777777777777777777777777777777777777" - lexes ":かたな" lexes ":かたな" - lexes "2e01" lexes "2e01" - lexes "\10" lexes "\10" - lexes "**=" lexes "**=" - lexes "break?" lexes "break?" - says syntax error on "00" says syntax error on "00" - lexes "false!" lexes "false!" - lexes "then" lexes "then" - lexes "elsif" lexes "elsif" - lexes utf-8 multibyte char lexes utf-8 multibyte char - lexes "<<=" lexes "<<=" - lexes "$~" lexes "$~" - says syntax error on "4i3" says syntax error on "4i3" - says syntax error on "0b100000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000" says syntax error on "0b100000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000" - lexes "~" lexes "~" - lexes "begin?" lexes "begin?" - lexes "0e40" lexes "0e40" - lexes ":<=" lexes ":<=" - says syntax error on "4u12" says syntax error on "4u12" - lexes "select" lexes "select" - says syntax error on ".42" says syntax error on ".42" - says syntax error on "0b100000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_u64" says syntax error on "0b100000000_00000000_00000000_00000000_00000000_00000000_00000000_00000000_u64" - lexes "1.2e+23_f64" lexes "1.2e+23_f64" - lexes "def?" lexes "def?" - lexes ":[]?" lexes ":[]?" - lexes "else!" lexes "else!" - lexes "next" lexes "next" - lexes "?" lexes "?" - lexes "0o123_i64" lexes "0o123_i64" - lexes "{{" lexes "{{" - lexes "0_f32" lexes "0_f32" - lexes "0b1111111111111111111111111111111" lexes "0b1111111111111111111111111111111" - lexes "&+@foo" lexes "&+@foo" - lexes "-0x80000000000000000000000000000000_i128" lexes "-0x80000000000000000000000000000000_i128" - says syntax error on "4u65" says syntax error on "4u65" - lexes "\n\n\n" lexes "\n\n\n" - says syntax error on "'\\u{}'" says syntax error on "'\\u{}'" - says syntax error on "4i22" says syntax error on "4i22" - lexes symbol followed by == lexes symbol followed by == - lexes "{" lexes "{" - lexes "0b111111111111111111111111111111111111111111111111111111111111111" lexes "0b111111111111111111111111111111111111111111111111111111111111111" - lexes '\a' lexes '\a' - lexes "return" lexes "return" - lexes 'a' lexes 'a' - lexes "100_000" lexes "100_000" - lexes "\4" lexes "\4" - lexes ":\"foo\"" lexes ":\"foo\"" - lexes "asm" lexes "asm" - lexes "yield" lexes "yield" - says syntax error on "-99999999999999999999" says syntax error on "-99999999999999999999" - says syntax error on "4f65" says syntax error on "4f65" - lexes "0f32" lexes "0f32" - lexes ":!~" lexes ":!~" - lexes "extend" lexes "extend" - lexes "0o1000000000000000000000" lexes "0o1000000000000000000000" - says syntax error on "'\\uFEDZ'" says syntax error on "'\\uFEDZ'" - lexes "return?" lexes "return?" - lexes "=" lexes "=" - lexes "0o177777_77777777_77777777" lexes "0o177777_77777777_77777777" - lexes "\1" lexes "\1" - lexes "0.5" lexes "0.5" - lexes '\r' lexes '\r' - lexes "//" lexes "//" - lexes "-0" lexes "-0" - lexes comment at the end lexes comment at the end - lexes not instance var lexes not instance var - lexes "+1.0f32" lexes "+1.0f32" - lexes ":+" lexes ":+" - lexes "true?" lexes "true?" - says syntax error on "2ef32" says syntax error on "2ef32" - lexes "verbatim" lexes "verbatim" - lexes "+1234" lexes "+1234" - lexes "include" lexes "include" - lexes "false?" lexes "false?" - lexes "1i128" lexes "1i128" - says syntax error on "-999999999999999999999999999999999999999" says syntax error on "-999999999999999999999999999999999999999" - lexes "|=" lexes "|=" - lexes "!" lexes "!" - lexes space after keyword lexes space after keyword - lexes "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF_u128" lexes "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF_u128" - lexes "annotation" lexes "annotation" - lexes "0b11111111111111111111111111111111" lexes "0b11111111111111111111111111111111" - says syntax error on "'\\u{110000}'" says syntax error on "'\\u{110000}'" - lexes "end!" lexes "end!" - lexes "end?" lexes "end?" - lexes "-1_i64" lexes "-1_i64" - lexes "&-" lexes "&-" - lexes "//=" lexes "//=" - lexes "return!" lexes "return!" - lexes "&" lexes "&" - lexes '\\' lexes '\\' - lexes "$1" lexes "$1" - lexes ":foo!" lexes ":foo!" - lexes "2147483648.foo" lexes "2147483648.foo" - says syntax error on ":+1" says syntax error on ":+1" - says syntax error on "0b🔮" says syntax error on "0b🔮" - lexes "0b1010" lexes "0b1010" - says syntax error on "0x1afafafafafafafafafafafi32" says syntax error on "0x1afafafafafafafafafafafi32" - lexes "1i64" lexes "1i64" - lexes "fooBar" lexes "fooBar" - lexes ":&+" lexes ":&+" - lexes "do" lexes "do" - says syntax error on "0b1000000000000000000000000000000000000000000000000000000000000000i64" says syntax error on "0b1000000000000000000000000000000000000000000000000000000000000000i64" - lexes "1i16" lexes "1i16" - lexes "unless" lexes "unless" - lexes "1.0f32" lexes "1.0f32" - says syntax error on "2e+e" says syntax error on "2e+e" - says syntax error on "$01" says syntax error on "$01" - lexes "with" lexes "with" - lexes "1e+23" lexes "1e+23" - lexes "0b1000000000000000000000000000000000000000000000000000000000000000" lexes "0b1000000000000000000000000000000000000000000000000000000000000000" - lexes "0" lexes "0" - lexes ":/" lexes ":/" - lexes "private" lexes "private" - lexes ":&" lexes ":&" - lexes "-1.0" lexes "-1.0" - lexes "0xffffffffffffffff" lexes "0xffffffffffffffff" - says syntax error on "$0?" says syntax error on "$0?" - says syntax error on "2e8i8" says syntax error on "2e8i8" - lexes "with_underscores" lexes "with_underscores" - lexes "0o700000000000000000000" lexes "0o700000000000000000000" - lexes "case" lexes "case" - lexes "9223372036854775807" lexes "9223372036854775807" - lexes "elsif!" lexes "elsif!" - lexes "def" lexes "def" - lexes utf-8 char lexes utf-8 char - lexes "118446744073709551616_u128" lexes "118446744073709551616_u128" - lexes "1.2e+23" lexes "1.2e+23" - lexes ">" lexes ">" - lexes "$?" lexes "$?" - says syntax error on "-11111111111111111111" says syntax error on "-11111111111111111111" - lexes "module" lexes "module" - lexes char with unicode codepoint and curly with zeros lexes char with unicode codepoint and curly with zeros - lexes __DIR__ lexes __DIR__ - says syntax error on "4.0_u32" says syntax error on "4.0_u32" - lexes "1_234.567_890" lexes "1_234.567_890" - lexes __FILE__ lexes __FILE__ - lexes ">>" lexes ">>" - lexes '\b' lexes '\b' - lexes "1u128" lexes "1u128" - lexes "1i32" lexes "1i32" - lexes "&+" lexes "&+" - lexes "@[" lexes "@[" - lexes "else?" lexes "else?" - says syntax error on "'\\uDFFF'" says syntax error on "'\\uDFFF'" - lexes "===" lexes "===" - lexes "0b11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111" lexes "0b11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111" - lexes "1i64" lexes "1i64" - lexes "1.0" lexes "1.0" - says syntax error on "-2147483649_i32" says syntax error on "-2147483649_i32" - lexes "^" lexes "^" - lexes "0o123" lexes "0o123" - lexes "0x7fffffff_i32" lexes "0x7fffffff_i32" - says syntax error on "340282366920938463463374607431768211456" says syntax error on "340282366920938463463374607431768211456" - lexes "abstract" lexes "abstract" - says syntax error on "0b11_f32" says syntax error on "0b11_f32" - lexes "1e+23_f32" lexes "1e+23_f32" - lexes "1i64hello" lexes "1i64hello" - lexes "1i128hello" lexes "1i128hello" - lexes "**" lexes "**" - says syntax error on "-0u64" says syntax error on "-0u64" - lexes "1_u64" lexes "1_u64" - lexes '\0' lexes '\0' - says syntax error on "2e+" says syntax error on "2e+" - lexes ":&**" lexes ":&**" - lexes "1_u32" lexes "1_u32" - says syntax error on "-129_i8" says syntax error on "-129_i8" - lexes "1_u16" lexes "1_u16" - says syntax error on "/\\" says syntax error on "/\\" - lexes "\n" lexes "\n" - says syntax error on "0b100000000000000000000000000000000000000000000000000000000000000000u64" says syntax error on "0b100000000000000000000000000000000000000000000000000000000000000000u64" - lexes "with_1" lexes "with_1" - lexes "-1_i128" lexes "-1_i128" - says syntax error on "4i12" says syntax error on "4i12" - lexes "!=" lexes "!=" - lexes "1.0f32" lexes "1.0f32" - lexes "1u16" lexes "1u16" - lexes "=~" lexes "=~" - lexes "1_234.567_890_f32" lexes "1_234.567_890_f32" - lexes "&-@foo" lexes "&-@foo" - lexes "..." lexes "..." - lexes "if!" lexes "if!" - lexes "-0x80000001" lexes "-0x80000001" - lexes ":<" lexes ":<" - lexes "1f32" lexes "1f32" - lexes "\110" lexes "\110" - says syntax error on "128_i8" says syntax error on "128_i8" - lexes "<=>" lexes "<=>" - lexes "next?" lexes "next?" - lexes "%" lexes "%" - lexes "0b1111111111111111111111111111111_i32" lexes "0b1111111111111111111111111111111_i32" - says syntax error on "-0_u64" says syntax error on "-0_u64" - lexes "=>" lexes "=>" - says syntax error on "4i33" says syntax error on "4i33" - lexes "0x3fffffffffffffff" lexes "0x3fffffffffffffff" - lexes symbol followed by != lexes symbol followed by != - says syntax error on "0o1234567123456712345671234567" says syntax error on "0o1234567123456712345671234567" - lexes "&*" lexes "&*" - lexes "\8" lexes "\8" - lexes ":!=" lexes ":!=" - lexes "while" lexes "while" - lexes ":<=>" lexes ":<=>" - lexes space after char lexes space after char - lexes ":foo" lexes ":foo" - lexes "[" lexes "[" - lexes "type" lexes "type" - lexes ":=~" lexes ":=~" - lexes "&+=" lexes "&+=" - lexes "is_a?" lexes "is_a?" - lexes "1_i64" lexes "1_i64" - lexes "$_foo" lexes "$_foo" - says syntax error on "0F32" says syntax error on "0F32" - lexes regex after \r\n lexes regex after \r\n - lexes "0i8" lexes "0i8" - lexes "+" lexes "+" - lexes "-0o123" lexes "-0o123" -Code gen: magic constants - does __END_LINE__ in macro with block does __END_LINE__ in macro with block - does __LINE__ in macro does __LINE__ in macro - does __LINE__ when specifying one normal default arg does __LINE__ when specifying one normal default arg - does __END_LINE__ in macro without block does __END_LINE__ in macro without block - does __LINE__ does __LINE__ - does __END_LINE__ without block does __END_LINE__ without block - does __LINE__ with dispatch does __LINE__ with dispatch - does __END_LINE__ with block does __END_LINE__ with block - does __FILE__ in macro does __FILE__ in macro - does __FILE__ does __FILE__ - does __DIR__ does __DIR__ - does __LINE__ when specifying one default arg with __FILE__ does __LINE__ when specifying one default arg with __FILE__ - does __LINE__ when specifying one middle argument does __LINE__ when specifying one middle argument - does __DIR__ in macro does __DIR__ in macro -Semantic: def - errors if trying to declare method on generic class instance errors if trying to declare method on generic class instance - errors when calling two functions with nil type errors when calling two functions with nil type - points error at name (#6937) points error at name (#6937) - errors when default value is incompatible with type restriction errors when default value is incompatible with type restriction - errors if return type doesn't match on class method errors if return type doesn't match on class method - fixes bug #165 fixes bug #165 - doesn't find type in namespace through free var doesn't find type in namespace through free var - uses free variable with metaclass uses free variable with metaclass - uses free variable uses free variable - reports block given reports block given - is ok if returns Int32? with explicit return is ok if returns Int32? with explicit return - types call with union argument types call with union argument - says compile-time type on error says compile-time type on error - types a call with a float types a call with a float - uses free variable and doesn't conflict with top-level type uses free variable and doesn't conflict with top-level type - defines class method with self defines class method with self - says can only defined def on types and self says can only defined def on types and self - accesses free var of default argument (#1101) accesses free var of default argument (#1101) - types a call with an argument uses a new scope types a call with an argument uses a new scope - reports no block given reports no block given - gives correct error for wrong number of arguments for program call inside type (2) (#1024) gives correct error for wrong number of arguments for program call inside type (2) (#1024) - assigns def owner assigns def owner - reports undefined method reports undefined method - types a call with an argument types a call with an argument - can't use self in toplevel method can't use self in toplevel method - types a call with a double types a call with a double - types mutual infinite recursion types mutual infinite recursion - gives correct error for methods in Class gives correct error for methods in Class - types putchar with Char types putchar with Char - lookups methods in super modules lookups methods in super modules - do not use body for the def type do not use body for the def type - uses free variable with metaclass and default value uses free variable with metaclass and default value - clones regex literal value (#2384) clones regex literal value (#2384) - types getchar with Char types getchar with Char - gives correct error for methods in Class (2) gives correct error for methods in Class (2) - allows recursion with arg allows recursion with arg - gives correct error for wrong number of arguments for program call inside type (#1024) gives correct error for wrong number of arguments for program call inside type (#1024) - types simple recursion 2 types simple recursion 2 - uses free variable as block return type uses free variable as block return type - calls with default argument calls with default argument - reports no overload matches reports no overload matches - errors if return type doesn't match on instance method errors if return type doesn't match on instance method - errors if return type doesn't match errors if return type doesn't match - reports no overload matches 2 reports no overload matches 2 - errors when default value is incompatible with non-type restriction errors when default value is incompatible with non-type restriction - types a call with an argument types a call with an argument - types empty body def types empty body def - types mutual recursion types mutual recursion - types a call with an int types a call with an int - types simple recursion types simple recursion - shows free variables if no overload matches shows free variables if no overload matches - allows recursion allows recursion - errors if declares def inside if errors if declares def inside if - defines class method defines class method - types call with global scope types call with global scope -Crystal::TextHierarchyPrinter - works works - shows correct size for Bool member shows correct size for Bool member - shows correct size for members with bound types shows correct size for members with bound types - shows correct size for Proc inside extern struct shows correct size for Proc inside extern struct - shows correct total size of generic class if known shows correct total size of generic class if known - shows extern unions shows extern unions -Semantic: double splat - uses restriction on double splat, means all types must be that type uses restriction on double splat, means all types must be that type - errors if duplicate keys on call side with two double splats errors if duplicate keys on call side with two double splats - uses double splat restriction uses double splat restriction - errors missing argument with double splat errors missing argument with double splat - matches double splat on method (empty) matches double splat on method (empty) - uses restriction on double splat, doesn't match with empty named tuple uses restriction on double splat, doesn't match with empty named tuple - uses double splat in new uses double splat in new - matches double splat with regular splat matches double splat with regular splat - uses double splat restriction, matches empty uses double splat restriction, matches empty - matches double splat on method with named args and regular args matches double splat on method with named args and regular args - double splats named argument into arguments (1) double splats named argument into arguments (1) - matches double splat on method with named args matches double splat on method with named args - uses restriction on double splat, doesn't match with empty named tuple (2) uses restriction on double splat, doesn't match with empty named tuple (2) - double splats named argument into arguments (2) double splats named argument into arguments (2) - uses double splat restriction with concrete type uses double splat restriction with concrete type - matches named args producing an empty double splat (#2678) matches named args producing an empty double splat (#2678) - overloads based on double splat restriction overloads based on double splat restriction - errors if duplicate keys on call side with double splat and named args errors if duplicate keys on call side with double splat and named args -Crystal - normalize_path - assert assert - assert assert - assert assert - assert assert -Normalize: string interpolation - replaces through multiple levels replaces through multiple levels - normalizes string interpolation with multiple lines normalizes string interpolation with multiple lines - normalizes string interpolation normalizes string interpolation - replaces string constant that results from macro expansion replaces string constant that results from macro expansion - normalizes heredoc normalizes heredoc - replaces string constant replaces string constant -Crystal::Formatter - formats "if a\n # hello\n 2\nend" formats "if a\n # hello\n 2\nend" - formats ":&**" formats ":&**" - formats "1 if 2\n# foo" formats "1 if 2\n# foo" - formats "bar do\n foo <<-X\n bar\n X\nend" formats "bar do\n foo <<-X\n bar\n X\nend" - formats "class Bar\nprotected def foo(x)\na=b(c)\nend\nend" formats "class Bar\nprotected def foo(x)\na=b(c)\nend\nend" - formats "/foo/" formats "/foo/" - formats "->@foo.foo?" formats "->@foo.foo?" - formats "a.b &.[c]\n1" formats "a.b &.[c]\n1" - formats "offsetof( String, @length )" formats "offsetof( String, @length )" - formats "[] of Int32\n1" formats "[] of Int32\n1" - formats "foo.bar(&.% baz)" formats "foo.bar(&.% baz)" - formats "next( 1 , 2 )" formats "next( 1 , 2 )" - formats "def foo(x) : Int32 # bar\n # baz\nend" formats "def foo(x) : Int32 # bar\n # baz\nend" - formats "private def foo\nend\nprivate def bar\nend" formats "private def foo\nend\nprivate def bar\nend" - formats "$?.bar" formats "$?.bar" - formats "<<-HTML\n \#{\"foo\"}\n HTML" formats "<<-HTML\n \#{\"foo\"}\n HTML" - formats "class Foo\n def foo\n # nothing\n end\nend" formats "class Foo\n def foo\n # nothing\n end\nend" - formats "Foo::Bar?" formats "Foo::Bar?" - formats "Set { 1 , 2 }" formats "Set { 1 , 2 }" - formats "begin\n 0[1] rescue 2 end" formats "begin\n 0[1] rescue 2 end" - formats "def foo : (A | B(C))\n nil\nend" formats "def foo : (A | B(C))\n nil\nend" - formats "if 1\n foo(\n bar\n # comment\n )\nend" formats "if 1\n foo(\n bar\n # comment\n )\nend" - formats "{% if flag?(:freebsd) %}\n 1 + 2\n{% end %}\n\ncase x\nwhen 1234 then 1\nelse x\nend" formats "{% if flag?(:freebsd) %}\n 1 + 2\n{% end %}\n\ncase x\nwhen 1234 then 1\nelse x\nend" - formats "def foo\na = bar do\n1\nend\nend" formats "def foo\na = bar do\n1\nend\nend" - formats "bar = foo(->{\n 1 + 2\n})" formats "bar = foo(->{\n 1 + 2\n})" - formats "$? = 1" formats "$? = 1" - formats "b &.[c].d" formats "b &.[c].d" - formats "<<-HTML\n \#{\"foo\"}\n \#{\"bar\"}\n HTML" formats "<<-HTML\n \#{\"foo\"}\n \#{\"bar\"}\n HTML" - formats "A = 1\nFOO = 2\n\nEX = 3" formats "A = 1\nFOO = 2\n\nEX = 3" - formats "0_u64" formats "0_u64" - formats "foo( 1 , 2 )" formats "foo( 1 , 2 )" - formats "{ %() }" formats "{ %() }" - formats "enum Foo\nend" formats "enum Foo\nend" - formats "->Foo.foo!" formats "->Foo.foo!" - formats " _ , *_ ,\na.foo ,a.bar = 1 , 2,3" formats " _ , *_ ,\na.foo ,a.bar = 1 , 2,3" - formats "1/2" formats "1/2" - formats "1 \\\nensure 2" formats "1 \\\nensure 2" - formats "\"hel\nlo\"" formats "\"hel\nlo\"" - formats "a = [\n1,\n2]" formats "a = [\n1,\n2]" - formats "Foo:: Bar" formats "Foo:: Bar" - formats "\"foo \#{ 1 + 2 }\"" formats "\"foo \#{ 1 + 2 }\"" - formats "__DIR__" formats "__DIR__" - formats "Tuple()" formats "Tuple()" - formats "asm(\n # the assembly template string, following the\n # syntax for LLVM's integrated assembler\n \"nop\" : # output operands\n\"=r\"(foo), \"=r\"(bar) : # input operands\n\"r\"(1), \"r\"(baz) : # names of clobbered registers\n\"eax\", \"memory\" : # optional flags, corresponding to the LLVM IR\n # sideeffect / alignstack / inteldialect / unwind attributes\n\"volatile\", \"alignstack\", \"intel\", \"unwind\"\n)" formats "asm(\n # the assembly template string, following the\n # syntax for LLVM's integrated assembler\n \"nop\" : # output operands\n\"=r\"(foo), \"=r\"(bar) : # input operands\n\"r\"(1), \"r\"(baz) : # names of clobbered registers\n\"eax\", \"memory\" : # optional flags, corresponding to the LLVM IR\n # sideeffect / alignstack / inteldialect / unwind attributes\n\"volatile\", \"alignstack\", \"intel\", \"unwind\"\n)" - formats "class Foo ( *T, U )\nend" formats "class Foo ( *T, U )\nend" - formats "1 ... 2" formats "1 ... 2" - formats "foo do\n {1 => foo <<-X\n bar\n X\n }\nend" formats "foo do\n {1 => foo <<-X\n bar\n X\n }\nend" - formats "1.<=() { 3 }" formats "1.<=() { 3 }" - formats "<<-HTML\n \#{1}x\n y\n HTML" formats "<<-HTML\n \#{1}x\n y\n HTML" - formats "SomeLib.UppercasedFunCall" formats "SomeLib.UppercasedFunCall" - formats "a = begin\n 1\nend\n\na =\nbegin\n 1\nend\n\na = if 1\n 2\nend\n\nb = 1\nb ||= begin\n 2\nend\n\nb ||= if 1\n 2\nend\n\nb += if 1\n 2\nend\n\nb +=\nif 1\n 2\nend\n\na, b = begin\n 1\nend\n\na, b =\nbegin\n 1\nend\n\nc[x] = begin\n 2\nend\n\nc[x] =\nbegin\n 2\nend\n\nc[x] = if 1\n 2\nend\n\nc[x] ||= begin 1\n 2\nend\n\nc[x] ||= if 1\n 2\nend\n\nc[x] += if 1\n 2\nend\n\nc[x] += begin 1\n 2\nend\n\nc[x] +=\nbegin\n 1\n 2\nend\n\nfoo.bar = begin\nend\n\nfoo.bar =\nbegin\nend\n\nfoo.bar = if\n 2\nend\n\nfoo.bar += begin\n 2\nend\n\nfoo.bar += if\n 2\nend\n\n" formats "a = begin\n 1\nend\n\na =\nbegin\n 1\nend\n\na = if 1\n 2\nend\n\nb = 1\nb ||= begin\n 2\nend\n\nb ||= if 1\n 2\nend\n\nb += if 1\n 2\nend\n\nb +=\nif 1\n 2\nend\n\na, b = begin\n 1\nend\n\na, b =\nbegin\n 1\nend\n\nc[x] = begin\n 2\nend\n\nc[x] =\nbegin\n 2\nend\n\nc[x] = if 1\n 2\nend\n\nc[x] ||= begin 1\n 2\nend\n\nc[x] ||= if 1\n 2\nend\n\nc[x] += if 1\n 2\nend\n\nc[x] += begin 1\n 2\nend\n\nc[x] +=\nbegin\n 1\n 2\nend\n\nfoo.bar = begin\nend\n\nfoo.bar =\nbegin\nend\n\nfoo.bar = if\n 2\nend\n\nfoo.bar += begin\n 2\nend\n\nfoo.bar += if\n 2\nend\n\n" - formats "%{hello}" formats "%{hello}" - formats "page= <<-HTML\n foo\nHTML" formats "page= <<-HTML\n foo\nHTML" - formats "def foo(\nx, #foo\nz #bar\n)\nend" formats "def foo(\nx, #foo\nz #bar\n)\nend" - formats "if / /\nend" formats "if / /\nend" - formats "macro foo\n {{ 1 + 2 }}\\\n 1\n end" formats "macro foo\n {{ 1 + 2 }}\\\n 1\n end" - formats "def /(x)\n 1\nend" formats "def /(x)\n 1\nend" - formats "yield(\n1 , \n2)" formats "yield(\n1 , \n2)" - formats " [ 1 , 2 , 3 ] " formats " [ 1 , 2 , 3 ] " - formats "macro foo()\nend" formats "macro foo()\nend" - formats "next 1, {2, 3}" formats "next 1, {2, 3}" - formats "enum Foo\n A = 10\n FOO = 123\n BARBAZ = 1234\nend\n" formats "enum Foo\n A = 10\n FOO = 123\n BARBAZ = 1234\nend\n" - formats "a=1" formats "a=1" - formats " ((1) + 2)" formats " ((1) + 2)" - formats "$0" formats "$0" - formats "class Foo\n enum Bar\n A; B; C;\n D; E; F\nend\nend\n" formats "class Foo\n enum Bar\n A; B; C;\n D; E; F\nend\nend\n" - formats "~ 1" formats "~ 1" - formats "def x(@y = ->(z) {})\nend" formats "def x(@y = ->(z) {})\nend" - formats "x = a do\n 1 ||\n 2\nend" formats "x = a do\n 1 ||\n 2\nend" - formats "a = if 1\n2\nelse\n3\nend" formats "a = if 1\n2\nelse\n3\nend" - formats "def foo(\n @[MyAnn] bar,\n); end" formats "def foo(\n @[MyAnn] bar,\n); end" - formats "(1)" formats "(1)" - formats "[1,\n2,\n3\n]" formats "[1,\n2,\n3\n]" - formats "-> : Int32 {}" formats "-> : Int32 {}" - formats "foo(a: 1 // 2)" formats "foo(a: 1 // 2)" - formats "foo &.bar( 1 , 2 )" formats "foo &.bar( 1 , 2 )" - formats "foo 1, do\n2\nend" formats "foo 1, do\n2\nend" - formats "foo(1, 2,\n)" formats "foo(1, 2,\n)" - formats "abstract def foo\nabstract def bar" formats "abstract def foo\nabstract def bar" - formats "a&-1" formats "a&-1" - formats "{%\n unless true\n 1\n end\n%}" formats "{%\n unless true\n 1\n end\n%}" - formats "foo[ 1, 2 ]?" formats "foo[ 1, 2 ]?" - formats "alias A = ({A, (B)})" formats "alias A = ({A, (B)})" - formats "def foo(x, **z)\nend" formats "def foo(x, **z)\nend" - formats "class Foo < \n Bar \n\n 1 \n\nend" formats "class Foo < \n Bar \n\n 1 \n\nend" - formats "foo.[]" formats "foo.[]" - formats "foo &.responds_to?(:foo).bar" formats "foo &.responds_to?(:foo).bar" - formats "def foo(x : A(B), y)\nend" formats "def foo(x : A(B), y)\nend" - formats "foo(bar(baz3 do\nend))" formats "foo(bar(baz3 do\nend))" - formats "if 1\nfoo do | x , y | \n x \n end\nend" formats "if 1\nfoo do | x , y | \n x \n end\nend" - formats "@[Foo(\n foo: 1\n)]\ndef foo\nend" formats "@[Foo(\n foo: 1\n)]\ndef foo\nend" - formats "a &.b.as(C)" formats "a &.b.as(C)" - formats "foo[&.bar] = 1" formats "foo[&.bar] = 1" - formats "def run\n\nrescue\n 2\n 3\nend" formats "def run\n\nrescue\n 2\n 3\nend" - formats "a = case 1\nwhen 2\n3\nelse\n4\nend" formats "a = case 1\nwhen 2\n3\nelse\n4\nend" - formats "foo 1, # comment\n # bar\n do\n end" formats "foo 1, # comment\n # bar\n do\n end" - formats "1 # foo\n/ 1 /" formats "1 # foo\n/ 1 /" - formats "x, y, z = <<-FOO, <<-BAR, <<-BAZ\n hello\n FOO\n world\n BAR\n qux\nBAZ" formats "x, y, z = <<-FOO, <<-BAR, <<-BAZ\n hello\n FOO\n world\n BAR\n qux\nBAZ" - formats "next { 1 , 2 }" formats "next { 1 , 2 }" - formats "# Hello\n#\n# ```\n# puts 1+2 # bye\n# 1+2 # hello\n#\n# 1+2\n# ```\n\n# ```\n# puts 1+2\n\n# ```\n# puts 1+2\n\n# Hola\n#\n# 1+2\n# foo do\n# 3+4\n# end\n\n# Hey\n#\n# 1+2\n# foo do\n# 3+4\n# end\n#\n# ```\n# 1+2\n# ```\n#\n# 1+2\n#\n# Bye\n" formats "# Hello\n#\n# ```\n# puts 1+2 # bye\n# 1+2 # hello\n#\n# 1+2\n# ```\n\n# ```\n# puts 1+2\n\n# ```\n# puts 1+2\n\n# Hola\n#\n# 1+2\n# foo do\n# 3+4\n# end\n\n# Hey\n#\n# 1+2\n# foo do\n# 3+4\n# end\n#\n# ```\n# 1+2\n# ```\n#\n# 1+2\n#\n# Bye\n" - formats "foo { | a, ( _ , c ) | a + c }" formats "foo { | a, ( _ , c ) | a + c }" - formats "module Foo\n# nothing\nend" formats "module Foo\n# nothing\nend" - formats "def bar\n foo(<<-X,\n a\n X\n 1)\nend" formats "def bar\n foo(<<-X,\n a\n X\n 1)\nend" - formats "<<-FOO\nFOO" formats "<<-FOO\nFOO" - formats "1 > 2" formats "1 > 2" - formats " {% if 1 %} {% if 2 %} 2 {% end %} {% end %}" formats " {% if 1 %} {% if 2 %} 2 {% end %} {% end %}" - formats "foo bar # comment\n\n# doc\ndef baz; end" formats "foo bar # comment\n\n# doc\ndef baz; end" - formats "lib Foo\nfun foo(x : Int32, ... ) : Int32\nend" formats "lib Foo\nfun foo(x : Int32, ... ) : Int32\nend" - formats "foo.bar\n.baz" formats "foo.bar\n.baz" - formats "\"\#{ # foo\n foo = 1\n}\"" formats "\"\#{ # foo\n foo = 1\n}\"" - formats ":^" formats ":^" - formats ":+" formats ":+" - formats "yield *1 ,2" formats "yield *1 ,2" - gives proper line number in syntax error inside macro gives proper line number in syntax error inside macro - formats "case 1\nelse\n 2\nend" formats "case 1\nelse\n 2\nend" - formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" - formats "if 1\nif 2\n3 # foo\nend\nend" formats "if 1\nif 2\n3 # foo\nend\nend" - formats "if 0\n1 &&\n2 &&\n3\nend" formats "if 0\n1 &&\n2 &&\n3\nend" - formats " <<-HTML\n hello \n world \n HTML" formats " <<-HTML\n hello \n world \n HTML" - formats "1 &&\n2" formats "1 &&\n2" - formats "\"\#{\n foo = 1\n}\"" formats "\"\#{\n foo = 1\n}\"" - formats "next( 1 )" formats "next( 1 )" - formats "def `(x)\n 1\nend" formats "def `(x)\n 1\nend" - formats "def foo\nend\n\n\n\ndef bar\nend" formats "def foo\nend\n\n\n\ndef bar\nend" - formats "foo do\n {% foo <<-X\n bar\n X\n %}\nend" formats "foo do\n {% foo <<-X\n bar\n X\n %}\nend" - formats "\n\n1" formats "\n\n1" - formats "asm(\"nop\" : \"a\"(0) : \"b\"(1), \"c\"(2) )" formats "asm(\"nop\" : \"a\"(0) : \"b\"(1), \"c\"(2) )" - formats "enum Foo;end" formats "enum Foo;end" - formats "+ a + d" formats "+ a + d" - formats "def foo(@[MyAnn] v); end" formats "def foo(@[MyAnn] v); end" - formats "p = Foo[1, 2, 3,\n 4, 5, 6,\n ]" formats "p = Foo[1, 2, 3,\n 4, 5, 6,\n ]" - formats "x = uninitialized Int32" formats "x = uninitialized Int32" - formats "1\n..2" formats "1\n..2" - formats "foo &.>=(2)" formats "foo &.>=(2)" - formats "lib LibFoo\n {% begin %}\n fun x = y(Int32)\n {% end %}\nend" formats "lib LibFoo\n {% begin %}\n fun x = y(Int32)\n {% end %}\nend" - formats "foo[ 1 , 2 ]" formats "foo[ 1 , 2 ]" - formats "foo([\n 1, 2,\n 3, 4,\n])" formats "foo([\n 1, 2,\n 3, 4,\n])" - formats "x : Int32 |\nString" formats "x : Int32 |\nString" - formats "module Foo;end" formats "module Foo;end" - formats "if 1\n {% for x in y %} {% end %}\nend" formats "if 1\n {% for x in y %} {% end %}\nend" - formats "macro foo( x = 1, y = 2, &block)\nend" formats "macro foo( x = 1, y = 2, &block)\nend" - formats "FOO = 2 + 3\nA = 1 - 10" formats "FOO = 2 + 3\nA = 1 - 10" - formats "x : Int32 = 1" formats "x : Int32 = 1" - formats "macro foo\n def bar \n end \n end" formats "macro foo\n def bar \n end \n end" - formats " ( 1; 2; 3 ) " formats " ( 1; 2; 3 ) " - formats "<<-HTML\n \#{__FILE__}\n HTML" formats "<<-HTML\n \#{__FILE__}\n HTML" - formats "break *1" formats "break *1" - formats "/\#{1}/imx" formats "/\#{1}/imx" - formats "class Foo; 1; end" formats "class Foo; 1; end" - formats "1\nyield\n2" formats "1\nyield\n2" - formats "macro foo\n %foo{x.id+2}\nend" formats "macro foo\n %foo{x.id+2}\nend" - formats "foo.as?(T).bar" formats "foo.as?(T).bar" - formats "->@foo.foo!" formats "->@foo.foo!" - formats "def foo(x : ( A | B )) : ( A | B )\nend" formats "def foo(x : ( A | B )) : ( A | B )\nend" - formats "if 1\ncase 1\nwhen 2\n3\nend\nend" formats "if 1\ncase 1\nwhen 2\n3\nend\nend" - formats "def foo : self | Nil\n nil\nend" formats "def foo : self | Nil\n nil\nend" - formats "case 1 \n when 2 then 3 \n end" formats "case 1 \n when 2 then 3 \n end" - formats "yield 1 , *2" formats "yield 1 , *2" - formats "@a" formats "@a" - formats "case 1 \n when 2 ; 3 \n end" formats "case 1 \n when 2 ; 3 \n end" - formats "%w(one two three)" formats "%w(one two three)" - formats "lib Foo\nstruct Foo\nx : Int32\nend\nend" formats "lib Foo\nstruct Foo\nx : Int32\nend\nend" - formats "1 # foo\n1234 # bar\n\n10 # bar" formats "1 # foo\n1234 # bar\n\n10 # bar" - formats "%(\n1\n)\n\n{\n 1 => 2,\n 234 => 5,\n}" formats "%(\n1\n)\n\n{\n 1 => 2,\n 234 => 5,\n}" - formats "%" formats "%" - formats "[foo <<-X\nbar\nX\n]" formats "[foo <<-X\nbar\nX\n]" - formats " {% begin %} 2 {% end %}" formats " {% begin %} 2 {% end %}" - formats "def foo(\n @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n bar\n); end" - formats "foo(self // 1)" formats "foo(self // 1)" - formats "break {1, 2}, {3, 4}" formats "break {1, 2}, {3, 4}" - formats "class Foo\n@x : Int32\nend" formats "class Foo\n@x : Int32\nend" - formats "def foo( x , * y )\nend" formats "def foo( x , * y )\nend" - formats "$~.bar" formats "$~.bar" - formats "1.===() { 3 }" formats "1.===() { 3 }" - formats "def foo(@[AnnOne] @[AnnTwo] & ); end" formats "def foo(@[AnnOne] @[AnnTwo] & ); end" - formats "class Foo;end" formats "class Foo;end" - formats "1.>=() { 3 }" formats "1.>=() { 3 }" - formats "10**a" formats "10**a" - formats "require \"foo\"\n\n@x : Int32\n\nclass Bar\nend" formats "require \"foo\"\n\n@x : Int32\n\nclass Bar\nend" - formats "1_234" formats "1_234" - formats "foo.% bar" formats "foo.% bar" - formats "def foo(x, *, y, **z)\nend" formats "def foo(x, *, y, **z)\nend" - formats "case 1 \n when .foo? \n 3 \n end" formats "case 1 \n when .foo? \n 3 \n end" - formats "begin\n1\n2\n3\nend" formats "begin\n1\n2\n3\nend" - formats "foo.bar(1) # comment\n .baz" formats "foo.bar(1) # comment\n .baz" - formats "foo &.is_a?(T).bar" formats "foo &.is_a?(T).bar" - formats "foo . bar()" formats "foo . bar()" - formats "if a\n2; 3\nelse\n3\nend" formats "if a\n2; 3\nelse\n3\nend" - formats "a || b" formats "a || b" - formats "-> : Array(Int32) {}" formats "-> : Array(Int32) {}" - formats "()" formats "()" - formats "foo({\n 1 => 2,\n 3 => 4,\n 5 => 6,\n})" formats "foo({\n 1 => 2,\n 3 => 4,\n 5 => 6,\n})" - formats "module Foo # foo\nend" formats "module Foo # foo\nend" - formats "macro foo\n macro bar\n \\{% begin %}\n \\\\{% puts %}\n \\{% end %}\n end\nend" formats "macro foo\n macro bar\n \\{% begin %}\n \\\\{% puts %}\n \\{% end %}\n end\nend" - formats "case / /\nwhen /x/, / /\n / /\nend" formats "case / /\nwhen /x/, / /\n / /\nend" - formats "foo do \n x \n end" formats "foo do \n x \n end" - formats "lib Foo\nalias Foo = Bar -> \n$a : Int32\nend" formats "lib Foo\nalias Foo = Bar -> \n$a : Int32\nend" - formats "return {1, 2}, {3, 4}" formats "return {1, 2}, {3, 4}" - formats "foo({\n 1 => 2,\n 3 => {\n 4 => 5,\n },\n})" formats "foo({\n 1 => 2,\n 3 => {\n 4 => 5,\n },\n})" - formats "def foo(@[MyAnn] &block); end" formats "def foo(@[MyAnn] &block); end" - formats "def foo : A(B)\n nil\nend" formats "def foo : A(B)\n nil\nend" - formats "foo . is_a? ( Bar )" formats "foo . is_a? ( Bar )" - formats "def foo()\n1\nend" formats "def foo()\n1\nend" - formats "::Tuple()" formats "::Tuple()" - formats "alias Foo::Bar =Baz" formats "alias Foo::Bar =Baz" - formats "a &.a.!" formats "a &.a.!" - formats "enum Foo : Int32\nA = 1\nend" formats "enum Foo : Int32\nA = 1\nend" - formats "def foo\nend\ndef bar\nend" formats "def foo\nend\ndef bar\nend" - formats "x\n# foo\n\n# bar" formats "x\n# foo\n\n# bar" - formats "%w{one( two( three)}" formats "%w{one( two( three)}" - formats "{% begin %}\n \"\n foo\"\n{% end %}" formats "{% begin %}\n \"\n foo\"\n{% end %}" - formats "module Readline\n @@completion_proc : (String -> Array(String)?) | (String -> Array(String)) | Nil\nend" formats "module Readline\n @@completion_proc : (String -> Array(String)?) | (String -> Array(String)) | Nil\nend" - formats "class Foo\nx = 1\nend" formats "class Foo\nx = 1\nend" - formats "1 \\\n+ 2" formats "1 \\\n+ 2" - formats "<<-FOO\nfoo\n\#{\"foo\"}\nFOO" formats "<<-FOO\nfoo\n\#{\"foo\"}\nFOO" - formats "lib Foo\nstruct Foo\nend\nend" formats "lib Foo\nstruct Foo\nend\nend" - formats "{% foo <<-X\nbar\nX\n%}" formats "{% foo <<-X\nbar\nX\n%}" - formats "{\n variables => true,\n query => <<-HEREDOC,\n foo\n HEREDOC\n}" formats "{\n variables => true,\n query => <<-HEREDOC,\n foo\n HEREDOC\n}" - formats "def //(x)\n 1\nend" formats "def //(x)\n 1\nend" - formats "alias Foo=\nBar" formats "alias Foo=\nBar" - formats "\"\#{\n foo = 1}\"" formats "\"\#{\n foo = 1}\"" - formats "foo(1,\n &.bar)" formats "foo(1,\n &.bar)" - formats "asm(\"nop\" :::: \"volatile\" )" formats "asm(\"nop\" :::: \"volatile\" )" - formats "::Tuple(T)" formats "::Tuple(T)" - formats "enum Baz\nA = 1\nFOO = 2\n\nEX = 3\nend" formats "enum Baz\nA = 1\nFOO = 2\n\nEX = 3\nend" - formats "@[Foo]\ndef foo\nend" formats "@[Foo]\ndef foo\nend" - formats "Foo( x: Int32 , y: Float64 )" formats "Foo( x: Int32 , y: Float64 )" - formats "lib Foo\nunion Foo\nend\nend" formats "lib Foo\nunion Foo\nend\nend" - formats "unless a\nunless b\n3\nelse\n4\nend\nend" formats "unless a\nunless b\n3\nelse\n4\nend\nend" - formats "def foo : Int32\n 1\nend" formats "def foo : Int32\n 1\nend" - formats "def foo( @[MyAnn] v ); end" formats "def foo( @[MyAnn] v ); end" - formats "'\\n'" formats "'\\n'" - formats "foo x: 1, y: 2" formats "foo x: 1, y: 2" - formats "foo . responds_to?( :bar )" formats "foo . responds_to?( :bar )" - formats "lib Foo\n fun Bar\nend" formats "lib Foo\n fun Bar\nend" - formats "1 # foo" formats "1 # foo" - formats "lib LibFoo\n {% begin %}\n fun foo : Int32\n {% end %}\nend" formats "lib LibFoo\n {% begin %}\n fun foo : Int32\n {% end %}\nend" - formats "\"hel\\nlo\"" formats "\"hel\\nlo\"" - formats "enum Foo\nA \nend" formats "enum Foo\nA \nend" - formats "begin\n1\nrescue ex\n3\nend" formats "begin\n1\nrescue ex\n3\nend" - formats "break { {1, 2}, {3, 4} }, 5" formats "break { {1, 2}, {3, 4} }, 5" - formats "-> { 1 }" formats "-> { 1 }" - formats "if 1 &&\n2 &&\n3\n4\nend" formats "if 1 &&\n2 &&\n3\n4\nend" - formats "macro foo\n {% if true %}if true{% end %}\n {% if true %}end{% end %}\nend" formats "macro foo\n {% if true %}if true{% end %}\n {% if true %}end{% end %}\nend" - formats "class Foo\n@x : Int32\nend" formats "class Foo\n@x : Int32\nend" - formats "a(&.b.c.as(C))" formats "a(&.b.c.as(C))" - formats "asm(\"nop\" : \"a\"(0), \"b\"(1) )" formats "asm(\"nop\" : \"a\"(0), \"b\"(1) )" - formats "$~ = 1" formats "$~ = 1" - formats "Hash{\n foo => <<-EOF,\n foo\n EOF\n bar => <<-BAR,\n bar\n BAR\n}" formats "Hash{\n foo => <<-EOF,\n foo\n EOF\n bar => <<-BAR,\n bar\n BAR\n}" - formats "foo &.[]?( 1, 2 )" formats "foo &.[]?( 1, 2 )" - formats "[\n1,\n\n2]" formats "[\n1,\n\n2]" - formats "call(foo <<-X\nbar\nX\n)" formats "call(foo <<-X\nbar\nX\n)" - formats "foo.foo1(\n bar\n .bar1\n .bar2)" formats "foo.foo1(\n bar\n .bar1\n .bar2)" - formats "foo(->do\n 1 + 2\nend)" formats "foo(->do\n 1 + 2\nend)" - formats "1 +\n # foo\n 2" formats "1 +\n # foo\n 2" - formats "unless a\n2\n3\nelse\n4\n5\nend" formats "unless a\n2\n3\nelse\n4\n5\nend" - formats "page= <<-HTML\n \#{1}foo\nHTML" formats "page= <<-HTML\n \#{1}foo\nHTML" - formats "1 &+ 2" formats "1 &+ 2" - formats "def foo(x = __FILE__ )\nend" formats "def foo(x = __FILE__ )\nend" - formats "def foo(\n a, b,\n)\nend" formats "def foo(\n a, b,\n)\nend" - formats "begin\n1\nrescue Int32 \n3\nend" formats "begin\n1\nrescue Int32 \n3\nend" - formats "def foo(a,\n *b)\nend" formats "def foo(a,\n *b)\nend" - formats "with foo yield bar" formats "with foo yield bar" - formats "macro foo\n {{\n1 + 2 }}\nend" formats "macro foo\n {{\n1 + 2 }}\nend" - formats "->@@foo.foo=" formats "->@@foo.foo=" - formats "def foo\n 1\n #\n\n\nrescue\nend" formats "def foo\n 1\n #\n\n\nrescue\nend" - formats "<<-HTML\n hello \n world \n HTML" formats "<<-HTML\n hello \n world \n HTML" - formats "def foo\n 1 #\nrescue\nend" formats "def foo\n 1 #\nrescue\nend" - formats "foo({\nbar: 1,\n})" formats "foo({\nbar: 1,\n})" - formats "Foo" formats "Foo" - formats "def foo\nend\n\ndef bar\nend\n\n# foo" formats "def foo\nend\n\ndef bar\nend\n\n# foo" - formats "alias Foo::Bar=Baz" formats "alias Foo::Bar=Baz" - formats "{% if true %}\n # x\n # y\n{% end %}" formats "{% if true %}\n # x\n # y\n{% end %}" - formats "asm(\n\"nop\" : \"a\"(0), \"b\"(1) )" formats "asm(\n\"nop\" : \"a\"(0), \"b\"(1) )" - formats "foo\n .bar(\n 1\n )" formats "foo\n .bar(\n 1\n )" - formats "next 1" formats "next 1" - formats "foo.bar. as? Int32" formats "foo.bar. as? Int32" - formats "def foo(&: Int32)\nend" formats "def foo(&: Int32)\nend" - formats "yield 1\n2" formats "yield 1\n2" - formats "begin\n a\nend.b { }\nc" formats "begin\n a\nend.b { }\nc" - formats "def a\n b(\n 1, # x\n # y\n a: 1, # x\n # y\n b: 2 # z\n )\nend" formats "def a\n b(\n 1, # x\n # y\n a: 1, # x\n # y\n b: 2 # z\n )\nend" - formats "1 + 2" formats "1 + 2" - formats "foo a: 1\nb" formats "foo a: 1\nb" - formats "def a\n b(\n 1, # x\n # y\n 2\n )\nend" formats "def a\n b(\n 1, # x\n # y\n 2\n )\nend" - formats "asm(\"nop\" ::: \"eax\" , \"ebx\" )" formats "asm(\"nop\" ::: \"eax\" , \"ebx\" )" - formats "foo\n .foo1(bar\n .bar1\n .bar2)" formats "foo\n .foo1(bar\n .bar1\n .bar2)" - formats "foo.[1, 2] = 3" formats "foo.[1, 2] = 3" - formats "$0.bar" formats "$0.bar" - formats "foo &.==(2)" formats "foo &.==(2)" - formats "foo.[]()" formats "foo.[]()" - formats "{\n 1 => 2, 3 => 4,\n 567 => 8910,\n}" formats "{\n 1 => 2, 3 => 4,\n 567 => 8910,\n}" - formats "foo &.bar.nil?()" formats "foo &.bar.nil?()" - formats "`foo \#{ bar }`" formats "`foo \#{ bar }`" - formats "if 1\n[ 1 , 2 , 3 ]\nend" formats "if 1\n[ 1 , 2 , 3 ]\nend" - formats "->@@foo.foo?" formats "->@@foo.foo?" - formats "(a).b { }\nc" formats "(a).b { }\nc" - formats "def foo\n1\n2\n# foo\nend" formats "def foo\n1\n2\n# foo\nend" - formats "@[Foo::Bar]" formats "@[Foo::Bar]" - formats "def foo : Int32 \n end" formats "def foo : Int32 \n end" - formats "a = 1\n;\nb = 2" formats "a = 1\n;\nb = 2" - formats "foo &.[]=(1, 2)" formats "foo &.[]=(1, 2)" - formats "enum Foo; A = 1; end" formats "enum Foo; A = 1; end" - formats "macro foo\n def bar\n {{\n 1 + 2\n }}\n end\nend" formats "macro foo\n def bar\n {{\n 1 + 2\n }}\n end\nend" - formats "->foo!" formats "->foo!" - formats "a.!" formats "a.!" - formats "foo(\"bar\" \\\n\"baz\")" formats "foo(\"bar\" \\\n\"baz\")" - formats "if 1\n# nothing\nend" formats "if 1\n# nothing\nend" - formats "{\n \"foo\": 1,\n \"babraz\": 2,\n}" formats "{\n \"foo\": 1,\n \"babraz\": 2,\n}" - formats "def foo (\nx ,\n y ) \n end" formats "def foo (\nx ,\n y ) \n end" - formats "1 == / /" formats "1 == / /" - formats "->@foo.foo" formats "->@foo.foo" - formats "foo &bar" formats "foo &bar" - formats "unless a\n2\nend" formats "unless a\n2\nend" - formats "def execute\n begin\n 1\n ensure\n 2\n end\n 3\nend" formats "def execute\n begin\n 1\n ensure\n 2\n end\n 3\nend" - formats "asm(\n\"nop\"\n)" formats "asm(\n\"nop\"\n)" - formats "@[Foo( 1, 2 )]" formats "@[Foo( 1, 2 )]" - formats "1 # foo\n1234 # bar" formats "1 # foo\n1234 # bar" - formats "def foo\n {% for x in y %}\n foo + bar\n {% end %}\nend" formats "def foo\n {% for x in y %}\n foo + bar\n {% end %}\nend" - formats "@x ||= 1" formats "@x ||= 1" - formats "begin\n1 ? 2 : 3\nend" formats "begin\n1 ? 2 : 3\nend" - formats "bar do\n call(foo <<-X\n bar\n X\n )\nend" formats "bar do\n call(foo <<-X\n bar\n X\n )\nend" - formats "1\n2 \n # foo" formats "1\n2 \n # foo" - formats "asm(\"nop\" :: \"r\"(0))" formats "asm(\"nop\" :: \"r\"(0))" - formats "foo(1, # foo\n &.bar)" formats "foo(1, # foo\n &.bar)" - formats "foo[x: 1, &.bar]?" formats "foo[x: 1, &.bar]?" - formats "a &.!.!" formats "a &.!.!" - formats "String???" formats "String???" - formats "-> :: Foo . foo?" formats "-> :: Foo . foo?" - formats "1" formats "1" - formats "is_a? Foo" formats "is_a? Foo" - formats "x : {A, B, }" formats "x : {A, B, }" - formats "{x => self // 1}" formats "{x => self // 1}" - formats "{ * 1 * 2,\n*\n3, 4 }" formats "{ * 1 * 2,\n*\n3, 4 }" - formats "\"foo\#{\"bar\"} Baz \#{\"qux\"} \"" formats "\"foo\#{\"bar\"} Baz \#{\"qux\"} \"" - formats "{ foo: 1 }" formats "{ foo: 1 }" - formats "begin\n array[\n 0 # Zero\n ]\nend" formats "begin\n array[\n 0 # Zero\n ]\nend" - formats "%w(\n one two\n three four\n)" formats "%w(\n one two\n three four\n)" - formats "foo.[]" formats "foo.[]" - formats "foo : (A -> B)\nbar : C" formats "foo : (A -> B)\nbar : C" - formats "long_variable_name = [\n {\n :foo => 1,\n }, {\n :bar => 2,\n },\n]" formats "long_variable_name = [\n {\n :foo => 1,\n }, {\n :bar => 2,\n },\n]" - formats "alias Foo::Bar = Baz" formats "alias Foo::Bar = Baz" - formats "->( ){ x }" formats "->( ){ x }" - formats "def self . foo\nend" formats "def self . foo\nend" - formats "alias Foo= Bar" formats "alias Foo= Bar" - formats "foo {;1}" formats "foo {;1}" - formats "foo(&.@bar)" formats "foo(&.@bar)" - formats "@[::Foo::Bar]" formats "@[::Foo::Bar]" - formats "def foo(\n **a\n # comment\n)\n 1\nend" formats "def foo(\n **a\n # comment\n)\n 1\nend" - formats "select \n when foo ; 2 \n end" formats "select \n when foo ; 2 \n end" - formats "if 1\n {% if 2 %} {% end %}\nend" formats "if 1\n {% if 2 %} {% end %}\nend" - formats "def foo : (A, B) ->\n nil\nend" formats "def foo : (A, B) ->\n nil\nend" - formats "x : (A | B)" formats "x : (A | B)" - formats "next *1" formats "next *1" - formats "foo[bar.baz]\n .qux" formats "foo[bar.baz]\n .qux" - formats "{\n \"a\" => 1, \"b\" => 2,\n \"foo\" => 3, \"bar\" => 4,\n \"coconio\" => 5, \"lala\" => 6,\n}\n" formats "{\n \"a\" => 1, \"b\" => 2,\n \"foo\" => 3, \"bar\" => 4,\n \"coconio\" => 5, \"lala\" => 6,\n}\n" - formats "if 1\n2\n3\n# foo\nend" formats "if 1\n2\n3\n# foo\nend" - formats "lib Foo\n fun foo =\n bar(Int32,\n Int32) : Int32\nend" formats "lib Foo\n fun foo =\n bar(Int32,\n Int32) : Int32\nend" - formats "x : Int32*" formats "x : Int32*" - formats "def %(x)\n 1\nend" formats "def %(x)\n 1\nend" - formats "x 1, \\\n 2" formats "x 1, \\\n 2" - formats "foo.bar / 2\n" formats "foo.bar / 2\n" - formats "lib Foo\n fun foo(Int32) : Int32\nend" formats "lib Foo\n fun foo(Int32) : Int32\nend" - formats "x[ y ] += 1" formats "x[ y ] += 1" - formats "false" formats "false" - formats "macro foo\n {{1 + 2}}\nend" formats "macro foo\n {{1 + 2}}\nend" - formats "foo.@bar" formats "foo.@bar" - formats "foo(//, //)" formats "foo(//, //)" - formats "{ # foo\n 1 => 2,\n}" formats "{ # foo\n 1 => 2,\n}" - formats "macro [](x)\nend" formats "macro [](x)\nend" - formats "foo &.as(T).bar" formats "foo &.as(T).bar" - formats "unless a\n # hello\n 2\nend" formats "unless a\n # hello\n 2\nend" - formats "->do\nend" formats "->do\nend" - formats "alias Foo=Bar" formats "alias Foo=Bar" - formats "1 #=> 2" formats "1 #=> 2" - formats "return 1\n# end" formats "return 1\n# end" - formats "foo 1,\n2" formats "foo 1,\n2" - formats "::foo(1, 2)" formats "::foo(1, 2)" - formats "if 1 &&\n (2 || 3)\n 1\nelse\n 2\nend" formats "if 1 &&\n (2 || 3)\n 1\nelse\n 2\nend" - formats "1 + \n2" formats "1 + \n2" - formats "[\n] of \n Foo " formats "[\n] of \n Foo " - formats "def foo(**z : Foo)\nend" formats "def foo(**z : Foo)\nend" - formats "x : {A, B}" formats "x : {A, B}" - formats "{% for a in %w() %}\n <<-FOO\n hello \n FOO\n{% end %}" formats "{% for a in %w() %}\n <<-FOO\n hello \n FOO\n{% end %}" - formats "foo.as? Int32*" formats "foo.as? Int32*" - formats "as Foo" formats "as Foo" - formats "yield 1 , \n2" formats "yield 1 , \n2" - formats "getter foo # comment\n\ndef foo\nend" formats "getter foo # comment\n\ndef foo\nend" - formats "-> : Int32* {}" formats "-> : Int32* {}" - formats "<<-HTML\n foo\n \#{\"foo\"}\n HTML" formats "<<-HTML\n foo\n \#{\"foo\"}\n HTML" - formats "case 1\nwhen a; 2\nelse; b\nend" formats "case 1\nwhen a; 2\nelse; b\nend" - formats "module Foo\n1\n\n# foo\nend" formats "module Foo\n1\n\n# foo\nend" - formats "while 1 &&\n2 &&\n3\n4\nend" formats "while 1 &&\n2 &&\n3\n4\nend" - formats "def foo(@[AnnOne] @[AnnTwo] v); end" formats "def foo(@[AnnOne] @[AnnTwo] v); end" - formats "lib Foo\n fun foo =\n \"bar\"(Int32) : Int32\n # comment\nend" formats "lib Foo\n fun foo =\n \"bar\"(Int32) : Int32\n # comment\nend" - formats "foo[ 1 , 2 ] =3" formats "foo[ 1 , 2 ] =3" - formats "{%\n if true\n 1\n else\n 2\n end\n%}" formats "{%\n if true\n 1\n else\n 2\n end\n%}" - formats "foo &.[a] = 1" formats "foo &.[a] = 1" - formats "a &.b.as C" formats "a &.b.as C" - formats "break" formats "break" - formats "while 1\n2\nend" formats "while 1\n2\nend" - formats "macro foo\n 1 + 2 \n end" formats "macro foo\n 1 + 2 \n end" - formats "foo.as? ( Int32* )" formats "foo.as? ( Int32* )" - formats "[1, 2,\n 3, 4]\n" formats "[1, 2,\n 3, 4]\n" - formats "nil?" formats "nil?" - formats "{% if true %}\n # x\n{% end %}" formats "{% if true %}\n # x\n{% end %}" - formats "begin\n1\nensure\n2\nend" formats "begin\n1\nensure\n2\nend" - formats "lib Foo\nfun foo() : Int32\nend" formats "lib Foo\nfun foo() : Int32\nend" - formats "foo.bar. as Int32" formats "foo.bar. as Int32" - formats "1 + # foo\n2" formats "1 + # foo\n2" - formats "x : {\"foo bar\": Int32}" formats "x : {\"foo bar\": Int32}" - formats "p = Foo[\n 1, 2, 3,\n 4, 5, 6\n]\n" formats "p = Foo[\n 1, 2, 3,\n 4, 5, 6\n]\n" - formats "[c.x]\n .foo" formats "[c.x]\n .foo" - formats "->@@foo.foo" formats "->@@foo.foo" - formats " {% if 1 %} 2 {% end %}" formats " {% if 1 %} 2 {% end %}" - formats "1.[]= { 3 }" formats "1.[]= { 3 }" - formats "module Ton\n macro foo\n class {{name.id}}\n end\n end\nend" formats "module Ton\n macro foo\n class {{name.id}}\n end\n end\nend" - formats "break( *1 , *2 )" formats "break( *1 , *2 )" - formats "def foo(\n @[MyAnn]\n bar\n); end" formats "def foo(\n @[MyAnn]\n bar\n); end" - formats "1.!=(2) { 3 }" formats "1.!=(2) { 3 }" - formats "# Here is the doc of a method, and contains an example:\n#\n# ```\n# result = foo\n#\n# puts result\n# ```\ndef foo\n # ...\nend\n" formats "# Here is the doc of a method, and contains an example:\n#\n# ```\n# result = foo\n#\n# puts result\n# ```\ndef foo\n # ...\nend\n" - formats "asm(\n# foo\n\"nop\"\n# bar\n)" formats "asm(\n# foo\n\"nop\"\n# bar\n)" - formats "1*2" formats "1*2" - formats "x = <<-EOF\n 1\nEOF" formats "x = <<-EOF\n 1\nEOF" - formats "1\n.as?(Int32)" formats "1\n.as?(Int32)" - formats "yield *1" formats "yield *1" - formats "def foo ( x : self ) \n end" formats "def foo ( x : self ) \n end" - formats "def foo(@[AnnOne] @[AnnTwo] v); end" formats "def foo(@[AnnOne] @[AnnTwo] v); end" - formats "foo{|x| x}" formats "foo{|x| x}" - formats "class Foo \n\n 1 \n\nend" formats "class Foo \n\n 1 \n\nend" - formats "foo((1..3))" formats "foo((1..3))" - formats "foo = {1, {2,\n 3},\n 4}" formats "foo = {1, {2,\n 3},\n 4}" - formats " <<-EOF\n 1\n EOF" formats " <<-EOF\n 1\n EOF" - formats "alignof( Int32 )" formats "alignof( Int32 )" - formats " case 1\n when 2\n 3\n else #:newline, :eof\n 1 if 2\n return 3\n end\n" formats " case 1\n when 2\n 3\n else #:newline, :eof\n 1 if 2\n return 3\n end\n" - formats "unless a\n2\nelse\n3\nend" formats "unless a\n2\nelse\n3\nend" - formats "begin\n call\n # comment\nrescue\n call\n # comment\nelse\n call\n # comment\nensure\n call\n # comment\nend" formats "begin\n call\n # comment\nrescue\n call\n # comment\nelse\n call\n # comment\nensure\n call\n # comment\nend" - formats "foo = 1\n->foo.foo=" formats "foo = 1\n->foo.foo=" - formats "macro foo\n {% for x in y %}\\ 2 {% end %}\\\nend" formats "macro foo\n {% for x in y %}\\ 2 {% end %}\\\nend" - formats "foo(\n <<-HERE,\n hello\n HERE\n foo: 1,\n)" formats "foo(\n <<-HERE,\n hello\n HERE\n foo: 1,\n)" - formats "if 1\n2 && 3\nend" formats "if 1\n2 && 3\nend" - formats ":&" formats ":&" - formats "a = 1 + # foo\n2" formats "a = 1 + # foo\n2" - formats "macro foo(\n a,\n **b,\n)\nend" formats "macro foo(\n a,\n **b,\n)\nend" - formats "1\n.as(Int32)" formats "1\n.as(Int32)" - formats "macro foo\n {% unless 1 %} 2 {% end %}\nend" formats "macro foo\n {% unless 1 %} 2 {% end %}\nend" - formats "\"foo \#{ 1 } \#{ __DIR__ }\"" formats "\"foo \#{ 1 } \#{ __DIR__ }\"" - formats "{% if true %}\n # x\n #\n{% end %}\n\n# ```\n# x\n# ```" formats "{% if true %}\n # x\n #\n{% end %}\n\n# ```\n# x\n# ```" - formats "{1 => 2,\n 3 => 4, # lala\n}\n" formats "{1 => 2,\n 3 => 4, # lala\n}\n" - formats "foo a , **b" formats "foo a , **b" - formats "foo ((1) ? 2 : 3)" formats "foo ((1) ? 2 : 3)" - formats "1.==(2) { 3 }" formats "1.==(2) { 3 }" - formats "foo.\nbar" formats "foo.\nbar" - formats "'\\u{0123}'" formats "'\\u{0123}'" - formats "a+1" formats "a+1" - formats "foo bar:baz, qux:other" formats "foo bar:baz, qux:other" - formats "foo = 1\n->foo.foo?" formats "foo = 1\n->foo.foo?" - formats "def foo ( x , y , ) \n end" formats "def foo ( x , y , ) \n end" - formats "Foo( A , 1 )" formats "Foo( A , 1 )" - formats "foo(\n# x\n1,\n\n# y\nz: 2,\n\n# a\nb: 3)" formats "foo(\n# x\n1,\n\n# y\nz: 2,\n\n# a\nb: 3)" - formats "foo = 1\n->foo.bar=(Int32)" formats "foo = 1\n->foo.bar=(Int32)" - formats "foo x: 1" formats "foo x: 1" - formats "def foo(a, # comment\n *b)\nend" formats "def foo(a, # comment\n *b)\nend" - formats "case / /\nwhen / /, /x/\n / /\nend" formats "case / /\nwhen / /, /x/\n / /\nend" - formats "{% if 1 %}\n 2\n{% end %}\ndef foo\nend" formats "{% if 1 %}\n 2\n{% end %}\ndef foo\nend" - formats "[ * [ * [ 1 ] ], * \n[ 2] ]" formats "[ * [ * [ 1 ] ], * \n[ 2] ]" - formats "lib Foo\n fun foo =\n bar : Void\nend" formats "lib Foo\n fun foo =\n bar : Void\nend" - formats "foo self // 1" formats "foo self // 1" - formats "1.[]=(2) { 3 }" formats "1.[]=(2) { 3 }" - formats "{/ / => / /, / / => / /}" formats "{/ / => / /, / / => / /}" - formats "foo { | a, ( b , c, ), | a + b + c }" formats "foo { | a, ( b , c, ), | a + b + c }" - formats "def foo(a : T, b : U) forall T, U #\n #\nend" formats "def foo(a : T, b : U) forall T, U #\n #\nend" - formats "/foo \#{ bar }/" formats "/foo \#{ bar }/" - formats "extend Foo" formats "extend Foo" - formats "foo &.as(T)" formats "foo &.as(T)" - formats "def foo(x)\n {% if true %}\n # comment\n Foo = 1\n B = 2\n {% end %}\nend" formats "def foo(x)\n {% if true %}\n # comment\n Foo = 1\n B = 2\n {% end %}\nend" - formats "struct Foo\n # bar\n # baz\n1\nend" formats "struct Foo\n # bar\n # baz\n1\nend" - formats "foo &.[](1, 2)" formats "foo &.[](1, 2)" - formats "def foo\n a = 1; # foo\n a = 2; # bar\nend\n" formats "def foo\n a = 1; # foo\n a = 2; # bar\nend\n" - formats "[\n <<-EOF,\n foo\n EOF\n]" formats "[\n <<-EOF,\n foo\n EOF\n]" - formats "foo do # a\n # b\n bar\nend" formats "foo do # a\n # b\n bar\nend" - formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\",\n \"g\")" formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\",\n \"g\")" - formats "def foo(\n\n#foo\nx,\n\n#bar\nz\n)\nend" formats "def foo(\n\n#foo\nx,\n\n#bar\nz\n)\nend" - formats "foo(\"b\#{1}\" \\\n\"baz\")" formats "foo(\"b\#{1}\" \\\n\"baz\")" - formats "class Foo\ndef foo\n1\nensure\n2\nend\nend" formats "class Foo\ndef foo\n1\nensure\n2\nend\nend" - formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1), \"c\"(2) )" formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1), \"c\"(2) )" - formats "{\n foo: 1,\n b: 2,\n barbaz: 3,\n}" formats "{\n foo: 1,\n b: 2,\n barbaz: 3,\n}" - formats "{%\n if 1\n 2\n end\n%}" formats "{%\n if 1\n 2\n end\n%}" - formats "1\n# hello\n\n\n" formats "1\n# hello\n\n\n" - formats "foo do\n # bar\nend" formats "foo do\n # bar\nend" - formats "foo.[ 1, 2 ]?" formats "foo.[ 1, 2 ]?" - formats "getter foo : Int32 # comment\n\ndef foo\nend" formats "getter foo : Int32 # comment\n\ndef foo\nend" - formats "foo {;;1}" formats "foo {;;1}" - formats "$?" formats "$?" - formats "def foo\n1\nrescue\n2\nend" formats "def foo\n1\nrescue\n2\nend" - formats "break( 1 )" formats "break( 1 )" - formats "unless a\n2; 3\nelse\n3\nend" formats "unless a\n2; 3\nelse\n3\nend" - formats "[] of (((Array(T))))" formats "[] of (((Array(T))))" - formats "class X\n annotation FooAnnotation \n end \n end" formats "class X\n annotation FooAnnotation \n end \n end" - formats "foo (1), 2" formats "foo (1), 2" - formats "asm(\"nop\")" formats "asm(\"nop\")" - formats "foo &.is_a?(T)" formats "foo &.is_a?(T)" - formats "foo { | a, ( b , (c, d) ) | a + b + c }" formats "foo { | a, ( b , (c, d) ) | a + b + c }" - formats "macro foo\n %foo\nend" formats "macro foo\n %foo\nend" - formats "foo \"bar\": 1, \"baz qux\": 2" formats "foo \"bar\": 1, \"baz qux\": 2" - formats "macro foo\n if 1\n 1 + 2\n end\nend" formats "macro foo\n if 1\n 1 + 2\n end\nend" - formats "->@@foo.foo!" formats "->@@foo.foo!" - formats "-> : Int32 { }" formats "-> : Int32 { }" - formats "-> :: Foo . foo" formats "-> :: Foo . foo" - formats "->{ x }" formats "->{ x }" - formats "(\n a = 1\n a\n)" formats "(\n a = 1\n a\n)" - formats "next {1, 2}, 3" formats "next {1, 2}, 3" - formats "_ = 1" formats "_ = 1" - formats "1.<= do\nend" formats "1.<= do\nend" - formats "bar = foo([\n 1,\n 2,\n 3,\n])" formats "bar = foo([\n 1,\n 2,\n 3,\n])" - formats "foo do\n {{ foo <<-X\n bar\n X\n }}\nend" formats "foo do\n {{ foo <<-X\n bar\n X\n }}\nend" - formats "class Foo\n# nothing\nend" formats "class Foo\n# nothing\nend" - formats "1.[]=() { 3 }" formats "1.[]=() { 3 }" - formats "begin\n / /\nend" formats "begin\n / /\nend" - formats "-> :: foo?" formats "-> :: foo?" - formats "-> : Int32[1] {}" formats "-> : Int32[1] {}" - formats "if a\n2\nelse\n3\nend" formats "if a\n2\nelse\n3\nend" - formats "1\n..\n2" formats "1\n..\n2" - formats "class Actor\n macro inherited\nend\nend\n" formats "class Actor\n macro inherited\nend\nend\n" - formats "case nil\nelse nil; nil\n# comment\nend" formats "case nil\nelse nil; nil\n# comment\nend" - formats "if 1\n return foo(\n 1,\n 2,\n )\nend" formats "if 1\n return foo(\n 1,\n 2,\n )\nend" - formats "break 1 , *2" formats "break 1 , *2" - formats "+ 1" formats "+ 1" - formats "def foo ( @@select) \n end" formats "def foo ( @@select) \n end" - formats "case 1 \n when 2 ;\n 3 \n end" formats "case 1 \n when 2 ;\n 3 \n end" - formats "foo : (F(A)) | D" formats "foo : (F(A)) | D" - formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n @[MyAnn] @[MyAnn] baz,\n @[MyAnn]\n @[MyAnn]\n biz,\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n @[MyAnn] @[MyAnn] baz,\n @[MyAnn]\n @[MyAnn]\n biz,\n); end" - formats "@x[ 1 ] ||= 2" formats "@x[ 1 ] ||= 2" - formats "def foo\n {{@type}}\nend" formats "def foo\n {{@type}}\nend" - formats ":\"foo\"" formats ":\"foo\"" - formats "1 // 2" formats "1 // 2" - formats "@[Foo(\n foo: 1,\n)]\ndef foo\nend" formats "@[Foo(\n foo: 1,\n)]\ndef foo\nend" - formats ":|" formats ":|" - formats "def foo(**z)\nend" formats "def foo(**z)\nend" - formats "1 unless 2" formats "1 unless 2" - formats "macro foo\n 1 \n {{ \n 42 \n }} \n 2 \nend" formats "macro foo\n 1 \n {{ \n 42 \n }} \n 2 \nend" - formats "foo ()" formats "foo ()" - formats "foo \\\nbar" formats "foo \\\nbar" - formats "case 1\nwhen 1 then\n2\nwhen 3\n4\nend" formats "case 1\nwhen 1 then\n2\nwhen 3\n4\nend" - formats "foo = 1\n->foo.foo" formats "foo = 1\n->foo.foo" - formats ":&+" formats ":&+" - formats "foo(1,\n2,\n)" formats "foo(1,\n2,\n)" - formats "<<-FOO\nbar\#{\"foo\"}bar\nFOO" formats "<<-FOO\nbar\#{\"foo\"}bar\nFOO" - formats "foo &.bar.nil?" formats "foo &.bar.nil?" - formats "begin\n query = <<-HEREDOC\n foo\n HEREDOC\nend" formats "begin\n query = <<-HEREDOC\n foo\n HEREDOC\nend" - formats "" formats "" - assert assert - formats "lib LibFoo\n struct Bar\n {% begin %}\n x : Int32\n {% end %}\n end\nend" formats "lib LibFoo\n struct Bar\n {% begin %}\n x : Int32\n {% end %}\n end\nend" - formats "responds_to? :foo" formats "responds_to? :foo" - formats "case 1 \n when 2 ,\n 3 \n 4 \n end" formats "case 1 \n when 2 ,\n 3 \n 4 \n end" - formats "-> :: Foo . foo=" formats "-> :: Foo . foo=" - formats "a&+1" formats "a&+1" - formats "&+ 1" formats "&+ 1" - formats "{{ foo <<-X\nbar\nX\n}}" formats "{{ foo <<-X\nbar\nX\n}}" - formats "def foo : A | B(C)\n nil\nend" formats "def foo : A | B(C)\n nil\nend" - formats "@x : A(B | C)?" formats "@x : A(B | C)?" - formats "def foo(a : T) forall T\n #\n\nend" formats "def foo(a : T) forall T\n #\n\nend" - formats "def foo(a : T) forall T\n #\n\n\nend" formats "def foo(a : T) forall T\n #\n\n\nend" - formats "[1,\n2,\n3]" formats "[1,\n2,\n3]" - formats "x : Int32**" formats "x : Int32**" - formats "foo(\n # foo\n1,\n\n # bar\n2, \n)" formats "foo(\n # foo\n1,\n\n # bar\n2, \n)" - formats "a = while 1\n2\nend" formats "a = while 1\n2\nend" - formats "[ # foo\n 1,\n]" formats "[ # foo\n 1,\n]" - formats "if 1\n2\nelsif\n3\n4\nelsif 5\n6\nend" formats "if 1\n2\nelsif\n3\n4\nelsif 5\n6\nend" - formats "foo.bar do\n baz\n .b\nend" formats "foo.bar do\n baz\n .b\nend" - formats "case 1 \n when 2 ; 3 \n when 4 ; 5\nend" formats "case 1 \n when 2 ; 3 \n when 4 ; 5\nend" - formats "while 1\n2 # foo\nend" formats "while 1\n2 # foo\nend" - formats "lib Foo\n fun foo =\n\n\n bar(Int32) : Int32\nend" formats "lib Foo\n fun foo =\n\n\n bar(Int32) : Int32\nend" - formats "1 if 2\n# foo\n3" formats "1 if 2\n# foo\n3" - formats "foo \\\n foo: 1,\n bar: 2" formats "foo \\\n foo: 1,\n bar: 2" - formats "a = 1;;; b = 2" formats "a = 1;;; b = 2" - formats "%[hello]" formats "%[hello]" - formats "foo(\n1,\n 2 \n)" formats "foo(\n1,\n 2 \n)" - formats "fun foo(x : Int32) : Int32\n 1\nend" formats "fun foo(x : Int32) : Int32\n 1\nend" - formats "\"foo\" \\\n \"bar\" \\\n \"baz\"" formats "\"foo\" \\\n \"bar\" \\\n \"baz\"" - formats "case\n# hello\nwhen 1\n 2\nend" formats "case\n# hello\nwhen 1\n 2\nend" - formats "macro foo\n {% for value, i in values %}\\\n {% if true %}\\\n {% end %}\\\n {{ 1 }}/\n {% end %}\\\nend\n\n{\n 1 => 2,\n 1234 => 5,\n}\n" formats "macro foo\n {% for value, i in values %}\\\n {% if true %}\\\n {% end %}\\\n {{ 1 }}/\n {% end %}\\\nend\n\n{\n 1 => 2,\n 1234 => 5,\n}\n" - formats "0u64" formats "0u64" - formats "def foo( x , & block : Int32->Float64)\nend" formats "def foo( x , & block : Int32->Float64)\nend" - formats "1234 # foo\n1 # bar" formats "1234 # foo\n1 # bar" - formats "foo(\"bar\": 1, \"baz qux\": 2)" formats "foo(\"bar\": 1, \"baz qux\": 2)" - formats "foo.[] = 1" formats "foo.[] = 1" - formats "foo 1,\na: 1,\nb: 2,\nc: 3" formats "foo 1,\na: 1,\nb: 2,\nc: 3" - formats "def foo(@[MyAnn] &); end" formats "def foo(@[MyAnn] &); end" - formats "foo &.as?(T).bar" formats "foo &.as?(T).bar" - formats "yield( 1 , 2 )" formats "yield( 1 , 2 )" - formats "bla.select(&.all?{ |x| x } )" formats "bla.select(&.all?{ |x| x } )" - formats "->(x : Int32) { }" formats "->(x : Int32) { }" - formats "def foo ( @x, @y) \n end" formats "def foo ( @x, @y) \n end" - formats "1.===(2) { 3 }" formats "1.===(2) { 3 }" - formats "def foo ( @x) \n end" formats "def foo ( @x) \n end" - formats "1#foo" formats "1#foo" - formats "def foo(\n foo,\n @[MyAnn]\n &block\n); end" formats "def foo(\n foo,\n @[MyAnn]\n &block\n); end" - formats "enum Foo\nA = 1\nend" formats "enum Foo\nA = 1\nend" - formats "macro foo\n {{ 1 + 2 }}\\\nend" formats "macro foo\n {{ 1 + 2 }}\\\nend" - formats "macro foo(\n a,\n *b,\n)\nend" formats "macro foo(\n a,\n *b,\n)\nend" - formats "class Foo\n macro foo\n 1 + 2 \n end\n end" formats "class Foo\n macro foo\n 1 + 2 \n end\n end" - formats "1.<=(2) { 3 }" formats "1.<=(2) { 3 }" - formats " <<-HTML\n \#{1} \#{2}\n HTML" formats " <<-HTML\n \#{1} \#{2}\n HTML" - formats "select # some comment\nwhen bar\n break\nend" formats "select # some comment\nwhen bar\n break\nend" - formats "[\n1,\n2,\n3]" formats "[\n1,\n2,\n3]" - formats "if a\n2\n3\nelse\n4\n5\nend" formats "if a\n2\n3\nelse\n4\n5\nend" - formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] baz,\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] baz,\n); end" - formats "foo[&.bar]?" formats "foo[&.bar]?" - formats "foo.[ 1 , 2 ] =3" formats "foo.[ 1 , 2 ] =3" - formats "bar = foo({\n 1 => 2,\n 3 => 4,\n 5 => 6,\n })" formats "bar = foo({\n 1 => 2,\n 3 => 4,\n 5 => 6,\n })" - formats "until 1\n2\nend" formats "until 1\n2\nend" - formats "foo &.bar.is_a?(Baz)" formats "foo &.bar.is_a?(Baz)" - formats "def foo(x : self ?) \n end" formats "def foo(x : self ?) \n end" - formats "foo.bar=(2)\n1" formats "foo.bar=(2)\n1" - formats "@[Foo]" formats "@[Foo]" - formats "- 1" formats "- 1" - formats "foo do\n [foo <<-X\n bar\n X\n ]\nend" formats "foo do\n [foo <<-X\n bar\n X\n ]\nend" - formats "coco.lala\nfoo\n .bar" formats "coco.lala\nfoo\n .bar" - formats "macro foo\n <<-FOO\n hello \n FOO\nend" formats "macro foo\n <<-FOO\n hello \n FOO\nend" - formats "a &.!" formats "a &.!" - formats "case 1 \n when 2 \n 3 \n when 4 \n 5 \n end" formats "case 1 \n when 2 \n 3 \n when 4 \n 5 \n end" - formats "->foo?" formats "->foo?" - formats "def foo ( @@x) \n end" formats "def foo ( @@x) \n end" - formats "10/a" formats "10/a" - formats "{1 => foo <<-X\nbar\nX\n}" formats "{1 => foo <<-X\nbar\nX\n}" - formats "%r(foo \#{ bar })" formats "%r(foo \#{ bar })" - formats "foo x, self // 1" formats "foo x, self // 1" - formats "asm(\"a\" : :: : \"volatile\")" formats "asm(\"a\" : :: : \"volatile\")" - formats "lib Foo\nfun foo\nend" formats "lib Foo\nfun foo\nend" - formats "foo(\n 1, 2,\n&block)" formats "foo(\n 1, 2,\n&block)" - formats "case 1\nwhen a; 2\nelse; ; b\nend" formats "case 1\nwhen a; 2\nelse; ; b\nend" - formats " {{\n1 + 2 }}" formats " {{\n1 + 2 }}" - formats "foo(\n 1,\n 2\n) do\n 1\nend" formats "foo(\n 1,\n 2\n) do\n 1\nend" - formats "->{}" formats "->{}" - formats "def foo(&block: Int32)\nend" formats "def foo(&block: Int32)\nend" - formats "macro foo\nend" formats "macro foo\nend" - formats "->( x )\n:\nInt32 { }" formats "->( x )\n:\nInt32 { }" - formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1),\n\"c\"(2) )" formats "asm(\"nop\" : \"a\"(0)\n: \"b\"(1),\n\"c\"(2) )" - formats "enum Baz\nA = 1\nFOO\n\nEX = 3\nend" formats "enum Baz\nA = 1\nFOO\n\nEX = 3\nend" - formats "select \n when foo \n 2 \n else \n 3 \n end" formats "select \n when foo \n 2 \n else \n 3 \n end" - formats "yield 1" formats "yield 1" - formats "ary.size = (1).to_i" formats "ary.size = (1).to_i" - formats "def foo(a, **b : Int32)\nend" formats "def foo(a, **b : Int32)\nend" - formats "lib Bar\n enum Foo\n end\nend" formats "lib Bar\n enum Foo\n end\nend" - formats "def foo\nend;def bar\nend" formats "def foo\nend;def bar\nend" - formats "\"foo \#{bar}\" \\\n \"baz\"" formats "\"foo \#{bar}\" \\\n \"baz\"" - formats "select \n when foo then 2 \n end" formats "select \n when foo then 2 \n end" - formats "foo[x: 1, &.bar] = 1" formats "foo[x: 1, &.bar] = 1" - formats "x : Int32[ 8 ]" formats "x : Int32[ 8 ]" - formats "lib Foo\n fun foo =\n bar(Int32) : Int32\nend" formats "lib Foo\n fun foo =\n bar(Int32) : Int32\nend" - formats "1 ? 2 : 3" formats "1 ? 2 : 3" - formats "Foo( * T, { * A ,*\n B } )" formats "Foo( * T, { * A ,*\n B } )" - formats "{% verbatim do %}{{1}} + {{2}}{% end %}" formats "{% verbatim do %}{{1}} + {{2}}{% end %}" - formats "return( 1 )" formats "return( 1 )" - formats "def foo(x y)\nend" formats "def foo(x y)\nend" - formats "{\n a: 1,\n foo: bar,\n}" formats "{\n a: 1,\n foo: bar,\n}" - formats "1.=== { 3 }" formats "1.=== { 3 }" - formats "def foo=(x)\nend" formats "def foo=(x)\nend" - formats "foo.bar = \n1" formats "foo.bar = \n1" - formats "if a\nif b\n3\nelse\n4\nend\nend" formats "if a\nif b\n3\nelse\n4\nend\nend" - formats "1+2*3" formats "1+2*3" - formats "return" formats "return" - formats "def foo ( x ) : Int32 \n end" formats "def foo ( x ) : Int32 \n end" - Unicode bi-directional control characters - formats "/\u202A/" formats "/\u202A/" - formats "<<-EOS\n\u202A\#{1}\nEOS" formats "<<-EOS\n\u202A\#{1}\nEOS" - formats "%i(\u202E)" formats "%i(\u202E)" - formats "%r(\u202A\#{1})" formats "%r(\u202A\#{1})" - formats "%r(\u202A)" formats "%r(\u202A)" - formats "NamedTuple(\"\u202E\": Int32)" formats "NamedTuple(\"\u202E\": Int32)" - formats "\"\\c\u202A\#{1}\"" formats "\"\\c\u202A\#{1}\"" - formats "<<-EOS\n\u202E\nEOS" formats "<<-EOS\n\u202E\nEOS" - formats "\"\u2067\#{1}\"" formats "\"\u2067\#{1}\"" - formats "\"\\c\u2067\#{1}\"" formats "\"\\c\u2067\#{1}\"" - formats "<<-'EOS'\n\u2067\nEOS" formats "<<-'EOS'\n\u2067\nEOS" - formats "\"\\c\u2067\"" formats "\"\\c\u2067\"" - formats "def foo(\"\u2069\" x)\nend" formats "def foo(\"\u2069\" x)\nend" - formats "%q(\u202C)" formats "%q(\u202C)" - formats "%Q(\u202D\#{1})" formats "%Q(\u202D\#{1})" - formats "%r(\u202B\#{1})" formats "%r(\u202B\#{1})" - formats "%w(\u2068)" formats "%w(\u2068)" - formats "/\u2069\#{1}/" formats "/\u2069\#{1}/" - formats "\"\u202D\#{1}\"" formats "\"\u202D\#{1}\"" - formats "%q(\u2066)" formats "%q(\u2066)" - formats "/\u202E\#{1}/" formats "/\u202E\#{1}/" - formats "<<-'EOS'\n\u2066\nEOS" formats "<<-'EOS'\n\u2066\nEOS" - formats "\"\\c\u2069\#{1}\"" formats "\"\\c\u2069\#{1}\"" - formats "<<-EOS\n\u2068\#{1}\nEOS" formats "<<-EOS\n\u2068\#{1}\nEOS" - formats "%r(\u202C\#{1})" formats "%r(\u202C\#{1})" - formats "/\u202C\#{1}/" formats "/\u202C\#{1}/" - formats "%(\u202D)" formats "%(\u202D)" - formats "foo(\"\u2068\": 1)" formats "foo(\"\u2068\": 1)" - formats "NamedTuple(\"\u2067\": Int32)" formats "NamedTuple(\"\u2067\": Int32)" - formats "%r(\u2066)" formats "%r(\u2066)" - formats "\"\u2069\#{1}\"" formats "\"\u2069\#{1}\"" - formats "{\"\u2068\": 1}" formats "{\"\u2068\": 1}" - formats "foo(\"\u202A\": 1)" formats "foo(\"\u202A\": 1)" - formats "foo(\"\u2067\": 1)" formats "foo(\"\u2067\": 1)" - formats "<<-EOS\n\u2069\#{1}\nEOS" formats "<<-EOS\n\u2069\#{1}\nEOS" - formats "/\u202B\#{1}/" formats "/\u202B\#{1}/" - formats "<<-EOS\n\u202D\nEOS" formats "<<-EOS\n\u202D\nEOS" - formats "\"\u202A\#{1}\"" formats "\"\u202A\#{1}\"" - formats "%r(\u202B)" formats "%r(\u202B)" - formats "foo(\"\u202B\": 1)" formats "foo(\"\u202B\": 1)" - formats "%(\u202A)" formats "%(\u202A)" - formats "%q(\u202E)" formats "%q(\u202E)" - formats "%i(\u2067)" formats "%i(\u2067)" - formats "%q(\u202D)" formats "%q(\u202D)" - formats "%r(\u2066\#{1})" formats "%r(\u2066\#{1})" - formats "\"\u2066\"" formats "\"\u2066\"" - formats "%r(\u202E)" formats "%r(\u202E)" - formats "%Q(\u202A\#{1})" formats "%Q(\u202A\#{1})" - formats "\"\\c\u2069\"" formats "\"\\c\u2069\"" - formats "%w(\u202A)" formats "%w(\u202A)" - formats "\"\u2067\"" formats "\"\u2067\"" - formats "<<-'EOS'\n\u202E\nEOS" formats "<<-'EOS'\n\u202E\nEOS" - formats "<<-EOS\n\u2067\#{1}\nEOS" formats "<<-EOS\n\u2067\#{1}\nEOS" - formats "NamedTuple(\"\u202D\": Int32)" formats "NamedTuple(\"\u202D\": Int32)" - formats "%Q(\u202B\#{1})" formats "%Q(\u202B\#{1})" - formats "NamedTuple(\"\u2066\": Int32)" formats "NamedTuple(\"\u2066\": Int32)" - formats "def foo(\"\u202A\" x)\nend" formats "def foo(\"\u202A\" x)\nend" - formats "/\u2066\#{1}/" formats "/\u2066\#{1}/" - formats "\"\u2068\#{1}\"" formats "\"\u2068\#{1}\"" - formats "%Q(\u202B)" formats "%Q(\u202B)" - formats "%Q(\u202A)" formats "%Q(\u202A)" - formats "\"\\c\u202B\"" formats "\"\\c\u202B\"" - formats "\"\u2066\#{1}\"" formats "\"\u2066\#{1}\"" - formats "<<-EOS\n\u202B\nEOS" formats "<<-EOS\n\u202B\nEOS" - formats "%i(\u2068)" formats "%i(\u2068)" - formats "foo(\"\u202C\": 1)" formats "foo(\"\u202C\": 1)" - formats "%(\u2068)" formats "%(\u2068)" - formats "%i(\u202C)" formats "%i(\u202C)" - formats "{\"\u2066\": 1}" formats "{\"\u2066\": 1}" - formats "\"\u2069\"" formats "\"\u2069\"" - formats "\"\\c\u202E\#{1}\"" formats "\"\\c\u202E\#{1}\"" - formats "\"\\c\u202E\"" formats "\"\\c\u202E\"" - formats "%i(\u2066)" formats "%i(\u2066)" - formats "\"\\c\u202C\"" formats "\"\\c\u202C\"" - formats "%r(\u2069)" formats "%r(\u2069)" - formats "%i(\u202B)" formats "%i(\u202B)" - formats "\"\u202B\"" formats "\"\u202B\"" - formats "%Q(\u2068\#{1})" formats "%Q(\u2068\#{1})" - formats "def foo(\"\u202D\" x)\nend" formats "def foo(\"\u202D\" x)\nend" - formats "NamedTuple(\"\u202A\": Int32)" formats "NamedTuple(\"\u202A\": Int32)" - formats "<<-EOS\n\u2068\nEOS" formats "<<-EOS\n\u2068\nEOS" - formats "NamedTuple(\"\u202B\": Int32)" formats "NamedTuple(\"\u202B\": Int32)" - formats "%Q(\u2068)" formats "%Q(\u2068)" - formats "<<-'EOS'\n\u202D\nEOS" formats "<<-'EOS'\n\u202D\nEOS" - formats "/\u2067\#{1}/" formats "/\u2067\#{1}/" - formats "%(\u202B)" formats "%(\u202B)" - formats "%q(\u202B)" formats "%q(\u202B)" - formats "<<-EOS\n\u202C\nEOS" formats "<<-EOS\n\u202C\nEOS" - formats "%r(\u202D)" formats "%r(\u202D)" - formats "{\"\u2067\": 1}" formats "{\"\u2067\": 1}" - formats "{\"\u2069\": 1}" formats "{\"\u2069\": 1}" - formats "def foo(\"\u2067\" x)\nend" formats "def foo(\"\u2067\" x)\nend" - formats "<<-'EOS'\n\u202C\nEOS" formats "<<-'EOS'\n\u202C\nEOS" - formats "%i(\u202A)" formats "%i(\u202A)" - formats "/\u2068/" formats "/\u2068/" - formats "{\"\u202C\": 1}" formats "{\"\u202C\": 1}" - formats "%r(\u2067)" formats "%r(\u2067)" - formats "%q(\u2068)" formats "%q(\u2068)" - formats "/\u202E/" formats "/\u202E/" - formats "/\u202D/" formats "/\u202D/" - formats "/\u2068\#{1}/" formats "/\u2068\#{1}/" - formats "\"\\c\u2068\#{1}\"" formats "\"\\c\u2068\#{1}\"" - formats "def foo(\"\u202C\" x)\nend" formats "def foo(\"\u202C\" x)\nend" - formats "%(\u202C)" formats "%(\u202C)" - formats "%r(\u202E\#{1})" formats "%r(\u202E\#{1})" - formats "%w(\u202D)" formats "%w(\u202D)" - formats "/\u202C/" formats "/\u202C/" - formats "\"\\c\u2066\"" formats "\"\\c\u2066\"" - formats "%Q(\u202C\#{1})" formats "%Q(\u202C\#{1})" - formats "<<-EOS\n\u2066\nEOS" formats "<<-EOS\n\u2066\nEOS" - formats "%r(\u2068\#{1})" formats "%r(\u2068\#{1})" - formats "%r(\u2068)" formats "%r(\u2068)" - formats "foo(\"\u2066\": 1)" formats "foo(\"\u2066\": 1)" - formats "{\"\u202A\": 1}" formats "{\"\u202A\": 1}" - formats "<<-'EOS'\n\u202B\nEOS" formats "<<-'EOS'\n\u202B\nEOS" - formats "%Q(\u202E\#{1})" formats "%Q(\u202E\#{1})" - formats "{\"\u202D\": 1}" formats "{\"\u202D\": 1}" - formats "/\u202A\#{1}/" formats "/\u202A\#{1}/" - formats "%(\u2067)" formats "%(\u2067)" - formats "{\"\u202B\": 1}" formats "{\"\u202B\": 1}" - formats "<<-'EOS'\n\u2069\nEOS" formats "<<-'EOS'\n\u2069\nEOS" - formats "def foo(\"\u2068\" x)\nend" formats "def foo(\"\u2068\" x)\nend" - formats "<<-EOS\n\u202B\#{1}\nEOS" formats "<<-EOS\n\u202B\#{1}\nEOS" - formats "foo(\"\u2069\": 1)" formats "foo(\"\u2069\": 1)" - formats "%w(\u2069)" formats "%w(\u2069)" - formats "%(\u2069)" formats "%(\u2069)" - formats "%w(\u2066)" formats "%w(\u2066)" - formats "/\u2067/" formats "/\u2067/" - formats "/\u2069/" formats "/\u2069/" - formats "foo(\"\u202D\": 1)" formats "foo(\"\u202D\": 1)" - formats "%w(\u202E)" formats "%w(\u202E)" - formats "%(\u2066)" formats "%(\u2066)" - formats "<<-'EOS'\n\u2068\nEOS" formats "<<-'EOS'\n\u2068\nEOS" - formats "%Q(\u202E)" formats "%Q(\u202E)" - formats "%q(\u202A)" formats "%q(\u202A)" - formats "NamedTuple(\"\u2069\": Int32)" formats "NamedTuple(\"\u2069\": Int32)" - formats "%Q(\u202D)" formats "%Q(\u202D)" - formats "%q(\u2067)" formats "%q(\u2067)" - formats "<<-EOS\n\u2066\#{1}\nEOS" formats "<<-EOS\n\u2066\#{1}\nEOS" - formats "\"\\c\u202A\"" formats "\"\\c\u202A\"" - formats "/\u202B/" formats "/\u202B/" - formats "NamedTuple(\"\u2068\": Int32)" formats "NamedTuple(\"\u2068\": Int32)" - formats "\"\\c\u202D\#{1}\"" formats "\"\\c\u202D\#{1}\"" - formats "<<-EOS\n\u202C\#{1}\nEOS" formats "<<-EOS\n\u202C\#{1}\nEOS" - formats "%Q(\u2069)" formats "%Q(\u2069)" - formats "%i(\u2069)" formats "%i(\u2069)" - formats "\"\\c\u202B\#{1}\"" formats "\"\\c\u202B\#{1}\"" - formats "\"\\c\u202C\#{1}\"" formats "\"\\c\u202C\#{1}\"" - formats "%(\u202E)" formats "%(\u202E)" - formats "%w(\u2067)" formats "%w(\u2067)" - formats "%Q(\u2067)" formats "%Q(\u2067)" - formats "def foo(\"\u202B\" x)\nend" formats "def foo(\"\u202B\" x)\nend" - formats "/\u2066/" formats "/\u2066/" - formats "%r(\u202D\#{1})" formats "%r(\u202D\#{1})" - formats "%r(\u202C)" formats "%r(\u202C)" - formats "%Q(\u2066)" formats "%Q(\u2066)" - formats "NamedTuple(\"\u202C\": Int32)" formats "NamedTuple(\"\u202C\": Int32)" - formats "%i(\u202D)" formats "%i(\u202D)" - formats "<<-EOS\n\u202E\#{1}\nEOS" formats "<<-EOS\n\u202E\#{1}\nEOS" - formats "\"\u202C\#{1}\"" formats "\"\u202C\#{1}\"" - formats "\"\\c\u202D\"" formats "\"\\c\u202D\"" - formats "<<-'EOS'\n\u202A\nEOS" formats "<<-'EOS'\n\u202A\nEOS" - formats "%w(\u202B)" formats "%w(\u202B)" - formats "\"\u202A\"" formats "\"\u202A\"" - formats "\"\u202C\"" formats "\"\u202C\"" - formats "{\"\u202E\": 1}" formats "{\"\u202E\": 1}" - formats "\"\\c\u2066\#{1}\"" formats "\"\\c\u2066\#{1}\"" - formats "\"\u2068\"" formats "\"\u2068\"" - formats "%Q(\u2066\#{1})" formats "%Q(\u2066\#{1})" - formats "\"\u202E\#{1}\"" formats "\"\u202E\#{1}\"" - formats "%r(\u2069\#{1})" formats "%r(\u2069\#{1})" - formats "foo(\"\u202E\": 1)" formats "foo(\"\u202E\": 1)" - formats "\"\\c\u2068\"" formats "\"\\c\u2068\"" - formats "%Q(\u2067\#{1})" formats "%Q(\u2067\#{1})" - formats "<<-EOS\n\u202A\nEOS" formats "<<-EOS\n\u202A\nEOS" - formats "<<-EOS\n\u2067\nEOS" formats "<<-EOS\n\u2067\nEOS" - formats "<<-EOS\n\u2069\nEOS" formats "<<-EOS\n\u2069\nEOS" - formats "\"\u202B\#{1}\"" formats "\"\u202B\#{1}\"" - formats "%w(\u202C)" formats "%w(\u202C)" - formats "<<-EOS\n\u202D\#{1}\nEOS" formats "<<-EOS\n\u202D\#{1}\nEOS" - formats "\"\u202E\"" formats "\"\u202E\"" - formats "/\u202D\#{1}/" formats "/\u202D\#{1}/" - formats "%r(\u2067\#{1})" formats "%r(\u2067\#{1})" - formats "%Q(\u202C)" formats "%Q(\u202C)" - formats "def foo(\"\u202E\" x)\nend" formats "def foo(\"\u202E\" x)\nend" - formats "%Q(\u2069\#{1})" formats "%Q(\u2069\#{1})" - formats "\"\u202D\"" formats "\"\u202D\"" - formats "%q(\u2069)" formats "%q(\u2069)" - formats "def foo(\"\u2066\" x)\nend" formats "def foo(\"\u2066\" x)\nend" - formats "def foo(\n foo,\n\n @[MyAnn]\n &block\n); end" formats "def foo(\n foo,\n\n @[MyAnn]\n &block\n); end" - formats "SomeLib.UppercasedFunCall 1, 2" formats "SomeLib.UppercasedFunCall 1, 2" - formats "a = 1 if 1 == 2 ||\n 3 == 4\n" formats "a = 1 if 1 == 2 ||\n 3 == 4\n" - formats "case 1 \n when 2 , 3 \n 4 \n end" formats "case 1 \n when 2 , 3 \n 4 \n end" - formats "->{\n # first comment\n puts \"hi\"\n # second comment\n}" formats "->{\n # first comment\n puts \"hi\"\n # second comment\n}" - formats "break 1 , 2" formats "break 1 , 2" - formats "foo.as ( Int32* )" formats "foo.as ( Int32* )" - formats "return *1 ,2" formats "return *1 ,2" - formats "foo &.bar" formats "foo &.bar" - formats "->Foo.foo=" formats "->Foo.foo=" - formats "foo[1, &.bar] ||= 1" formats "foo[1, &.bar] ||= 1" - formats "1.>= do\nend" formats "1.>= do\nend" - formats "begin\n1\nrescue ex : Int32 | Float64 \n3\nend" formats "begin\n1\nrescue ex : Int32 | Float64 \n3\nend" - formats "1.<= { 3 }" formats "1.<= { 3 }" - formats "$1.bar" formats "$1.bar" - formats "foo : StaticArray(Foo, 12)[34]" formats "foo : StaticArray(Foo, 12)[34]" - formats "foo &.nil?" formats "foo &.nil?" - formats "x : Int32" formats "x : Int32" - formats "@@a" formats "@@a" - formats "long_variable_name = [1, 2, 3, # foo\n 4, 5, 6]" formats "long_variable_name = [1, 2, 3, # foo\n 4, 5, 6]" - formats "foo ( )" formats "foo ( )" - formats "->(){}" formats "->(){}" - formats "a = \\\n # foo\n nil" formats "a = \\\n # foo\n nil" - formats "bar = foo(->{\n 1 + 2\n})" formats "bar = foo(->{\n 1 + 2\n})" - formats "a = foo(baz1 do\nend)" formats "a = foo(baz1 do\nend)" - formats "begin; 1; end" formats "begin; 1; end" - formats "x = {% if flag?(:foo) %}\n foo + bar\n {% else %}\n baz + qux\n {% end %}" formats "x = {% if flag?(:foo) %}\n foo + bar\n {% else %}\n baz + qux\n {% end %}" - formats "lib Foo\nfun foo : Int32\nend" formats "lib Foo\nfun foo : Int32\nend" - formats "macro flags\n {% if 1 %}{{1}}a{{2}}{% end %}\\\nend" formats "macro flags\n {% if 1 %}{{1}}a{{2}}{% end %}\\\nend" - formats "foo(baz1 do\nend)" formats "foo(baz1 do\nend)" - formats "a = # foo\n bar(1)" formats "a = # foo\n bar(1)" - formats "あ.い, う.え.お = 1, 2" formats "あ.い, う.え.お = 1, 2" - formats "foo : (Array(String)?) | String" formats "foo : (Array(String)?) | String" - formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] @[MyAnn] baz,\n\n @[MyAnn]\n\n @[MyAnn]\n\n biz\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] @[MyAnn] baz,\n\n @[MyAnn]\n\n @[MyAnn]\n\n biz\n); end" - formats "$1" formats "$1" - formats "1.[]= do\nend" formats "1.[]= do\nend" - formats "next { {1, 2}, {3, 4} }" formats "next { {1, 2}, {3, 4} }" - formats "foo(1, 2,)" formats "foo(1, 2,)" - formats "macro foo\n {{x}} <<-FOO\n hello \n FOO\nend" formats "macro foo\n {{x}} <<-FOO\n hello \n FOO\nend" - formats "class Foo\n NamedTuple(\n a: Int32,\n )\nend" formats "class Foo\n NamedTuple(\n a: Int32,\n )\nend" - formats "next {1, 2}, {3, 4}" formats "next {1, 2}, {3, 4}" - formats "foo (1).bar" formats "foo (1).bar" - formats "'a'" formats "'a'" - formats "{%\n unless true\n 1\n else\n 2\n end\n%}" formats "{%\n unless true\n 1\n else\n 2\n end\n%}" - formats "def foo\n {% if flag?(:foo) %}\n foo + bar\n {% else %}\n baz + qux\n {% end %}\nend" formats "def foo\n {% if flag?(:foo) %}\n foo + bar\n {% else %}\n baz + qux\n {% end %}\nend" - formats "foo(<<-X,\na\nX\n 1)" formats "foo(<<-X,\na\nX\n 1)" - formats "struct Foo(T)\n# bar\n1\nend" formats "struct Foo(T)\n# bar\n1\nend" - formats ":/" formats ":/" - formats "next *1 ,2" formats "next *1 ,2" - formats "select\nwhen foo # foo\n # bar\nelse # foo\n # bar\nend" formats "select\nwhen foo # foo\n # bar\nelse # foo\n # bar\nend" - formats "1 if nil?\na.b + c" formats "1 if nil?\na.b + c" - formats "->Foo.foo?" formats "->Foo.foo?" - formats "if 1\nelse\n# nothing\nend" formats "if 1\nelse\n# nothing\nend" - formats "a = begin\n1\n2\nend" formats "a = begin\n1\n2\nend" - formats "a , b = 1 , 2" formats "a , b = 1 , 2" - formats "def foo\n\n1\n\nend" formats "def foo\n\n1\n\nend" - formats "yield 1 , 2" formats "yield 1 , 2" - formats "next( *1 , *2 )" formats "next( *1 , *2 )" - formats "`foo`" formats "`foo`" - formats "1 ;\n 2" formats "1 ;\n 2" - formats "def foo\n ((((((((((((((((0_u64\n ) | ptr[0]) << 8\n ) | ptr[1]) << 8\n ) | ptr[2]) << 8\n ) | ptr[3]) << 8\n ) | ptr[4]) << 8\n ) | ptr[5]) << 8\n ) | ptr[6]) << 8\n ) | ptr[7])\nend" formats "def foo\n ((((((((((((((((0_u64\n ) | ptr[0]) << 8\n ) | ptr[1]) << 8\n ) | ptr[2]) << 8\n ) | ptr[3]) << 8\n ) | ptr[4]) << 8\n ) | ptr[5]) << 8\n ) | ptr[6]) << 8\n ) | ptr[7])\nend" - formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\#{foo}\\v\\f\\e\"" formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\#{foo}\\v\\f\\e\"" - formats "foo({% verbatim do %}{{1}} + {{2}}{% end %})" formats "foo({% verbatim do %}{{1}} + {{2}}{% end %})" - formats "{\n <<-KEY => 1,\n key\n KEY\n}" formats "{\n <<-KEY => 1,\n key\n KEY\n}" - formats "long_variable_name = [\n {\n :foo => 1,\n },\n {\n :bar => 2,\n },\n]" formats "long_variable_name = [\n {\n :foo => 1,\n },\n {\n :bar => 2,\n },\n]" - formats "&- 1" formats "&- 1" - formats "if 1\n2\nend\nif 3\nend" formats "if 1\n2\nend\nif 3\nend" - formats "foo (1)" formats "foo (1)" - formats "->@foo.foo=" formats "->@foo.foo=" - formats "foo()" formats "foo()" - formats "foo . is_a? Bar" formats "foo . is_a? Bar" - formats "if a\nif b\nelse\n4\nend\nend" formats "if a\nif b\nelse\n4\nend\nend" - formats "def foo ( x = 1 ) \n end" formats "def foo ( x = 1 ) \n end" - formats "def foo(a, **b, # comment\n &block)\nend" formats "def foo(a, **b, # comment\n &block)\nend" - formats "foo = 1\n->foo.foo!" formats "foo = 1\n->foo.foo!" - formats "a = 1\ncase\nwhen 2\nelse\n a /= 3\nend" formats "a = 1\ncase\nwhen 2\nelse\n a /= 3\nend" - formats "{% verbatim do %}\n <<-FOO\n hello \n FOO\n{% end %}" formats "{% verbatim do %}\n <<-FOO\n hello \n FOO\n{% end %}" - formats "::Foo:: Bar" formats "::Foo:: Bar" - formats "a = if 1\n2\n3\nend" formats "a = if 1\n2\n3\nend" - formats "break *1 , *2" formats "break *1 , *2" - formats "foo &.[]?" formats "foo &.[]?" - formats "macro foo\n 1 + 2\nend" formats "macro foo\n 1 + 2\nend" - formats "def foo(*y, **z)\nend" formats "def foo(*y, **z)\nend" - formats "def foo( x , & : Int32 )\nend" formats "def foo( x , & : Int32 )\nend" - formats "あ.い = 1" formats "あ.い = 1" - formats "1 && (\n 2 || 3\n)" formats "1 && (\n 2 || 3\n)" - formats "if a\n2\nelse\nend" formats "if a\n2\nelse\nend" - formats "asm(\"nop\" : \"a\"(0),\n\"b\"(1)\n: \"c\"(2), \"d\"(3) )" formats "asm(\"nop\" : \"a\"(0),\n\"b\"(1)\n: \"c\"(2), \"d\"(3) )" - formats "unless a\nelse\n2\nend" formats "unless a\nelse\n2\nend" - formats "[1, 2, 3, ]" formats "[1, 2, 3, ]" - formats "::Pointer(T)" formats "::Pointer(T)" - formats "@[Foo()]" formats "@[Foo()]" - formats "foo : (String -> Array(String)?) | (String -> Array(String)) | Nil" formats "foo : (String -> Array(String)?) | (String -> Array(String)) | Nil" - formats "return *1 , *2" formats "return *1 , *2" - formats "asm(\"nop\"\n: \"a\"(0) )" formats "asm(\"nop\"\n: \"a\"(0) )" - formats "foo = 1\n->foo.[](Int32)" formats "foo = 1\n->foo.[](Int32)" - formats "<<-FOO\nfoo\n\#{1}\nFOO" formats "<<-FOO\nfoo\n\#{1}\nFOO" - formats "foo do;\n1; end" formats "foo do;\n1; end" - formats "next 1 , *2" formats "next 1 , *2" - formats "x.is_a? T\n3\n" formats "x.is_a? T\n3\n" - formats "case 1 # foo\nwhen 2 then 3 # bar\nwhen 4 then 5 # baz\nelse 6 # zzz\nend" formats "case 1 # foo\nwhen 2 then 3 # bar\nwhen 4 then 5 # baz\nelse 6 # zzz\nend" - formats "case 1\nwhen 8 then 1\nwhen 16 then 2\nwhen 256 then 3\nwhen 'a' then 5\nwhen \"foo\" then 6\nelse 4\nend" formats "case 1\nwhen 8 then 1\nwhen 16 then 2\nwhen 256 then 3\nwhen 'a' then 5\nwhen \"foo\" then 6\nelse 4\nend" - formats "{1 => 2, 3 => 4}\n{5234234 => 234098234, 7 => 8}" formats "{1 => 2, 3 => 4}\n{5234234 => 234098234, 7 => 8}" - formats "\"1\#{\"\#{\"2\"}\"}3\#{\"4\"}5\"" formats "\"1\#{\"\#{\"2\"}\"}3\#{\"4\"}5\"" - formats "# foo\ndef foo\nend\n# bar\ndef bar\nend" formats "# foo\ndef foo\nend\n# bar\ndef bar\nend" - formats "macro flags\n {% if 1 %}\\\n 1 {% else %}\\\n {% end %}\\\nend" formats "macro flags\n {% if 1 %}\\\n 1 {% else %}\\\n {% end %}\\\nend" - formats "foo &.[]( 1, 2 )" formats "foo &.[]( 1, 2 )" - formats "break 1, {2, 3}" formats "break 1, {2, 3}" - formats "foo : (self)?" formats "foo : (self)?" - formats "pointerof( @a )" formats "pointerof( @a )" - formats "case 1 # foo\nwhen 2\nend" formats "case 1 # foo\nwhen 2\nend" - formats "foo(\n 1, 2)" formats "foo(\n 1, 2)" - formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\")" formats "asm(\"a\" : \"b\"(c) : \"d\"(e)\n : \"f\")" - formats "Hash{\n foo => <<-EOF\n foo\n EOF\n}" formats "Hash{\n foo => <<-EOF\n foo\n EOF\n}" - formats "break { {1, 2}, {3, 4} }" formats "break { {1, 2}, {3, 4} }" - formats "\" \" * 2" formats "\" \" * 2" - formats "1 \\\nrescue 2" formats "1 \\\nrescue 2" - formats "begin\n select\n when foo\n # foo\n # bar\n else\n # foo\n # bar\n end\nend" formats "begin\n select\n when foo\n # foo\n # bar\n else\n # foo\n # bar\n end\nend" - formats "def foo(x @@y)\nend" formats "def foo(x @@y)\nend" - formats "macro foo(x)\n {% if 1 %} 2 {% end %}\nend" formats "macro foo(x)\n {% if 1 %} 2 {% end %}\nend" - formats "# ```text\n# 1 + 2\n# ```\n#\n# ```\n# 3 + 4\n# ```" formats "# ```text\n# 1 + 2\n# ```\n#\n# ```\n# 3 + 4\n# ```" - formats "[\n {\n 1 => 2,\n }, {\n 3 => 4,\n }, {\n 5 => 6,\n },\n]" formats "[\n {\n 1 => 2,\n }, {\n 3 => 4,\n }, {\n 5 => 6,\n },\n]" - formats "foo(a: //)" formats "foo(a: //)" - formats "foo.[1]" formats "foo.[1]" - formats "case 1\nwhen \"foo\" then 3\nwhen \"lalalala\" then 4\nelse 5\nend" formats "case 1\nwhen \"foo\" then 3\nwhen \"lalalala\" then 4\nelse 5\nend" - formats "yield(1 , \n2)" formats "yield(1 , \n2)" - formats "next 1 , 2" formats "next 1 , 2" - formats "__LINE__" formats "__LINE__" - formats "-> :: foo!" formats "-> :: foo!" - formats " {%\na = 1\n %}" formats " {%\na = 1\n %}" - formats "1\n2\n# foo" formats "1\n2\n# foo" - formats "asm(\"a\" :::: \"volatile\"\n)" formats "asm(\"a\" :::: \"volatile\"\n)" - formats "[1, 2, 3] of Foo" formats "[1, 2, 3] of Foo" - formats "private FOO = 2\nprivate A = 1" formats "private FOO = 2\nprivate A = 1" - formats "foo do # hello\nend" formats "foo do # hello\nend" - formats "a = 1\nb, c = 2, 3\n{% begin %}\n a |= 1\n b |= 2\n c |= 3\n{% end %}" formats "a = 1\nb, c = 2, 3\n{% begin %}\n a |= 1\n b |= 2\n c |= 3\n{% end %}" - formats "foo(1, &.bar)" formats "foo(1, &.bar)" - formats "foo(1 &- 2)" formats "foo(1 &- 2)" - formats "def foo(x)\n case //\n when //\n 3\n end\nend" formats "def foo(x)\n case //\n when //\n 3\n end\nend" - formats "foo 1 , &bar" formats "foo 1 , &bar" - formats "def foo(\n **a # comment\n)\n 1\nend" formats "def foo(\n **a # comment\n)\n 1\nend" - formats "1 .. 2" formats "1 .. 2" - formats "asm(\"a\" : \"b\"(c) : \"d\"(e) :: \"volatile\")" formats "asm(\"a\" : \"b\"(c) : \"d\"(e) :: \"volatile\")" - formats "next { {1, 2}, {3, 4} }, 5" formats "next { {1, 2}, {3, 4} }, 5" - formats "foo &.@bar" formats "foo &.@bar" - formats "foo.as(T).bar" formats "foo.as(T).bar" - formats "foo \\\n 1,\n 2" formats "foo \\\n 1,\n 2" - formats "case 1\nelse # foo\n # bar\nend" formats "case 1\nelse # foo\n # bar\nend" - formats "[\n 1, # foo\n 3,\n]" formats "[\n 1, # foo\n 3,\n]" - formats "enum Foo\n A; B; C\nend\n" formats "enum Foo\n A; B; C\nend\n" - formats "macro foo\n {{ 1 + 2 }}\nend" formats "macro foo\n {{ 1 + 2 }}\nend" - formats "foo.[]?( 1, 2 )" formats "foo.[]?( 1, 2 )" - formats "foo &.as?(T)" formats "foo &.as?(T)" - formats "foo.bar # comment\n .baz" formats "foo.bar # comment\n .baz" - formats "a &.b[c]?" formats "a &.b[c]?" - formats "1.== do\nend" formats "1.== do\nend" - formats "foo" formats "foo" - formats "asm(\"nop\" : : )" formats "asm(\"nop\" : : )" - formats "lib Foo\n fun foo =\n\n\n bar : Void\nend" formats "lib Foo\n fun foo =\n\n\n bar : Void\nend" - formats " {{\n1 + 2\n }}" formats " {{\n1 + 2\n }}" - formats "foo.bar\n .baz(\n 1\n )" formats "foo.bar\n .baz(\n 1\n )" - formats "class X; annotation FooAnnotation ; end ; end" formats "class X; annotation FooAnnotation ; end ; end" - formats ":-" formats ":-" - formats ":<<" formats ":<<" - formats "alias A = (B)" formats "alias A = (B)" - formats "foo &.bar.as(T)" formats "foo &.bar.as(T)" - formats "Foo( x: Int32 )" formats "Foo( x: Int32 )" - formats "->do\nx\nend" formats "->do\nx\nend" - formats "select\n# when foo\nwhen bar\n break\nend" formats "select\n# when foo\nwhen bar\n break\nend" - formats "foo 1, # comment\n do\n end" formats "foo 1, # comment\n do\n end" - formats "lib Foo\n fun foo =\n \"bar\"(Int32) : Int32\nend" formats "lib Foo\n fun foo =\n \"bar\"(Int32) : Int32\nend" - formats "while 1\n# nothing\nend" formats "while 1\n# nothing\nend" - formats "def foo\n 1\n 2\nrescue IO\n 1\nend" formats "def foo\n 1\n 2\nrescue IO\n 1\nend" - formats "macro flags\n {% if 1 %}\\\n {% end %}\\\nend" formats "macro flags\n {% if 1 %}\\\n {% end %}\\\nend" - formats "{ {1 => 2} }" formats "{ {1 => 2} }" - formats "begin\n 1 \\\n + 2\n 3\nend" formats "begin\n 1 \\\n + 2\n 3\nend" - formats "foo(bar([\n 1,\n]))" formats "foo(bar([\n 1,\n]))" - formats "{ {1, 2, 3} => 4 }" formats "{ {1, 2, 3} => 4 }" - formats "[] of Foo" formats "[] of Foo" - formats "lib Foo\n fun foo = \"bar\"(Int32) : Int32\nend" formats "lib Foo\n fun foo = \"bar\"(Int32) : Int32\nend" - formats "def foo(\n &block\n)\nend" formats "def foo(\n &block\n)\nend" - formats "true" formats "true" - formats "NamedTuple(\n a: Int32,\n)" formats "NamedTuple(\n a: Int32,\n)" - formats "foo(1 &+ \n2)" formats "foo(1 &+ \n2)" - formats "def foo ( x : Foo.class ) \n end" formats "def foo ( x : Foo.class ) \n end" - formats "foo.[ 1 , 2 ]" formats "foo.[ 1 , 2 ]" - formats "->\n:\nInt32\n{\n}" formats "->\n:\nInt32\n{\n}" - formats " macro foo\n end\n\n :+" formats " macro foo\n end\n\n :+" - formats "<<-HTML\n \#{\"fo\#{\"o\"}\"}\n HTML" formats "<<-HTML\n \#{\"fo\#{\"o\"}\"}\n HTML" - formats "return *1" formats "return *1" - formats "if 1\n2\nelsif\n3\n4\nend" formats "if 1\n2\nelsif\n3\n4\nend" - formats "yield" formats "yield" - formats "foo(A |\nB |\nC)" formats "foo(A |\nB |\nC)" - formats "select \n when foo \n 2 \n end" formats "select \n when foo \n 2 \n end" - formats "def foo(a,\n &block)\nend" formats "def foo(a,\n &block)\nend" - formats "class Actor\n macro inherited\n\nend\nend\n" formats "class Actor\n macro inherited\n\nend\nend\n" - formats "lib Foo\ntype Foo = Bar\nend" formats "lib Foo\ntype Foo = Bar\nend" - formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] @[MyAnn] baz,\n\n @[MyAnn]\n @[MyAnn]\n biz,\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n\n @[MyAnn] @[MyAnn] baz,\n\n @[MyAnn]\n @[MyAnn]\n biz,\n); end" - formats "def foo\n 1 #\nrescue\nend" formats "def foo\n 1 #\nrescue\nend" - formats "foo bar, \\\nbaz" formats "foo bar, \\\nbaz" - formats "foo do\n bar do\n foo <<-X\n bar\n X\n end\nend" formats "foo do\n bar do\n foo <<-X\n bar\n X\n end\nend" - formats "yield *1 , *2" formats "yield *1 , *2" - formats "foo(1, ) { }" formats "foo(1, ) { }" - formats "::StaticArray(T)" formats "::StaticArray(T)" - formats "while / /\nend" formats "while / /\nend" - formats "10 / a" formats "10 / a" - formats "1.!= { 3 }" formats "1.!= { 3 }" - formats "\"\#{\"foo\"}\"" formats "\"\#{\"foo\"}\"" - formats "asm(\"nop\" : \"a\"(0), \"b\"(1)\n: \"c\"(2), \"d\"(3) )" formats "asm(\"nop\" : \"a\"(0), \"b\"(1)\n: \"c\"(2), \"d\"(3) )" - formats "self.as(Int32)" formats "self.as(Int32)" - formats "foo(\n 1,\n &.foo\n)" formats "foo(\n 1,\n &.foo\n)" - formats "foo 1" formats "foo 1" - formats "foo { | ( a, *b , c ) | a }" formats "foo { | ( a, *b , c ) | a }" - formats "def foo ( @select) \n end" formats "def foo ( @select) \n end" - formats "::NamedTuple()" formats "::NamedTuple()" - formats "module Foo\n 1 # bar\nend\n\nmodule Foo\n 1\n # bar\nend\n\nmodule Foo\n 1\n\n # bar\nend\n\nmodule Foo\n 1\n 2\n # bar\nend\n\nmodule Foo\n 1\n 2\n\n # bar\nend\n\nif 1\n 1\n # bar\nend\n\nif 1\n 1\n\n # bar\nend\n\n1\n2\n# foo\n\n1\n2\n\n# foo\n" formats "module Foo\n 1 # bar\nend\n\nmodule Foo\n 1\n # bar\nend\n\nmodule Foo\n 1\n\n # bar\nend\n\nmodule Foo\n 1\n 2\n # bar\nend\n\nmodule Foo\n 1\n 2\n\n # bar\nend\n\nif 1\n 1\n # bar\nend\n\nif 1\n 1\n\n # bar\nend\n\n1\n2\n# foo\n\n1\n2\n\n# foo\n" - formats "String?" formats "String?" - formats " * a = 1 " formats " * a = 1 " - formats "case 1\nwhen 2 # a\n # b\nend" formats "case 1\nwhen 2 # a\n # b\nend" - formats "->(x : Int32) {}" formats "->(x : Int32) {}" - formats "a = \nif 1\n2\nend" formats "a = \nif 1\n2\nend" - formats "def foo( & )\nend" formats "def foo( & )\nend" - formats "begin\n begin\n a\n # b\n end\nend" formats "begin\n begin\n a\n # b\n end\nend" - formats "-> : {Int32, String} {}" formats "-> : {Int32, String} {}" - formats "foo.bar.baz\n.qux" formats "foo.bar.baz\n.qux" - formats "foo[x: 1, &.bar]" formats "foo[x: 1, &.bar]" - formats "{\n1 => 2 ,\n 3 => 4 }" formats "{\n1 => 2 ,\n 3 => 4 }" - formats "<<-HTML\n \#{1}x\n y\n z\n HTML" formats "<<-HTML\n \#{1}x\n y\n z\n HTML" - formats "nil" formats "nil" - formats "foo { |x, *y| }" formats "foo { |x, *y| }" - formats "1 ; 2" formats "1 ; 2" - formats "{ A: 1 }\n" formats "{ A: 1 }\n" - formats "def foo(\"bar baz\" qux)\nend" formats "def foo(\"bar baz\" qux)\nend" - formats "x = 1\nx += 1" formats "x = 1\nx += 1" - formats "if 1\n2\nelsif\n3\n4\nelse\n6\nend" formats "if 1\n2\nelsif\n3\n4\nelse\n6\nend" - formats "a = foo &.bar do\n 1 + 2\nend" formats "a = foo &.bar do\n 1 + 2\nend" - formats "a[1] , b[2] = 1 , 2" formats "a[1] , b[2] = 1 , 2" - formats "a = foo(bar(\n 1,\n 2,\n))" formats "a = foo(bar(\n 1,\n 2,\n))" - formats "def foo\n@x = uninitialized Int32\nend" formats "def foo\n@x = uninitialized Int32\nend" - formats "foo &.bar" formats "foo &.bar" - formats "def func # comment\n (1 + 2) / 3\nend" formats "def func # comment\n (1 + 2) / 3\nend" - formats "private getter foo" formats "private getter foo" - formats "asm(\"nop\" ::: \"eax\" , \"ebx\" : \"volatile\" , \"alignstack\" )" formats "asm(\"nop\" ::: \"eax\" , \"ebx\" : \"volatile\" , \"alignstack\" )" - formats "def foo(a, &@b)\nend" formats "def foo(a, &@b)\nend" - formats "macro foo\n{% verbatim do %}1 + 2{% end %}\nend" formats "macro foo\n{% verbatim do %}1 + 2{% end %}\nend" - formats "foo : Foo * * * * *" formats "foo : Foo * * * * *" - formats "1 \\\nif 2" formats "1 \\\nif 2" - formats "unless a\nunless b\nelse\n4\nend\nend" formats "unless a\nunless b\nelse\n4\nend\nend" - formats "return {1, 2}, 3" formats "return {1, 2}, 3" - formats "lib Foo\n {% if 1 %}\n fun foo\n {% end %}\nend\n\nmacro bar\n 1\nend" formats "lib Foo\n {% if 1 %}\n fun foo\n {% end %}\nend\n\nmacro bar\n 1\nend" - formats "->{ x }" formats "->{ x }" - formats "asm(\"nop\" : \"a\"(0) : \"b\"(1) )" formats "asm(\"nop\" : \"a\"(0) : \"b\"(1) )" - formats "foo.[] =(1)" formats "foo.[] =(1)" - formats "break { 1 , 2 }" formats "break { 1 , 2 }" - formats "inner &.color=(@color)\n1" formats "inner &.color=(@color)\n1" - formats "foo : (A) | D" formats "foo : (A) | D" - formats "<<-HTML\n \#{1}x\n HTML" formats "<<-HTML\n \#{1}x\n HTML" - formats "[\n [\n 1,\n ], [\n 2,\n ], [\n 3,\n ],\n]" formats "[\n [\n 1,\n ], [\n 2,\n ], [\n 3,\n ],\n]" - formats "\"\\a\\c\\b\\d\"" formats "\"\\a\\c\\b\\d\"" - formats "macro foo\n %foo{x,y}\nend" formats "macro foo\n %foo{x,y}\nend" - formats "class Foo\n macro foo\n 1\n end\nend" formats "class Foo\n macro foo\n 1\n end\nend" - formats "1.as Int32" formats "1.as Int32" - formats "{ } of A => B" formats "{ } of A => B" - formats "->() do x end" formats "->() do x end" - formats "asm(\"nop\" ::: \"eax\" )" formats "asm(\"nop\" ::: \"eax\" )" - formats "if a\n2\n3\nend" formats "if a\n2\n3\nend" - formats "class Foo ( T )\nend" formats "class Foo ( T )\nend" - formats "foo.responds_to? :bar\n1" formats "foo.responds_to? :bar\n1" - formats "def a\n [\n 1, # x\n # y\n ]\nend" formats "def a\n [\n 1, # x\n # y\n ]\nend" - formats "macro foo\n {% if 1 %} 2 {% else %} 3 {% end %}\nend" formats "macro foo\n {% if 1 %} 2 {% else %} 3 {% end %}\nend" - formats "foo[&.bar]" formats "foo[&.bar]" - formats "-> : Int32 { }" formats "-> : Int32 { }" - formats "foo(bar(\n 1,\n baz(2,\n 3,\n )\n))" formats "foo(bar(\n 1,\n baz(2,\n 3,\n )\n))" - formats "case 1\nend" formats "case 1\nend" - formats "foo([\n 1,\n bar do\n end,\n [\n 2,\n ],\n])" formats "foo([\n 1,\n bar do\n end,\n [\n 2,\n ],\n])" - formats "enum Foo : Int32\nA = 1\ndef foo\n1\nend\nend" formats "enum Foo : Int32\nA = 1\ndef foo\n1\nend\nend" - formats "{% if true %}\n <<-FOO\n hello \n FOO\n{% end %}" formats "{% if true %}\n <<-FOO\n hello \n FOO\n{% end %}" - formats "if 1\n[\n a() # b\n]\nend" formats "if 1\n[\n a() # b\n]\nend" - formats "lib Foo::Bar\nend" formats "lib Foo::Bar\nend" - formats "def foo \n end" formats "def foo \n end" - formats "def foo(x)\n {% if true %}\n \\{% if true %}\n x = 1\n \\{% else %}\n x = 2\n \\{% end %}\n \\{% for x in y %}\n x = 1\n \\{% end %}\n \\{{x}}\n \\{% x %}\n {% end %}\nend" formats "def foo(x)\n {% if true %}\n \\{% if true %}\n x = 1\n \\{% else %}\n x = 2\n \\{% end %}\n \\{% for x in y %}\n x = 1\n \\{% end %}\n \\{{x}}\n \\{% x %}\n {% end %}\nend" - formats "%(hello)" formats "%(hello)" - formats "def foo( & block )\nend" formats "def foo( & block )\nend" - formats "1 ?\n 2 : \n 3" formats "1 ?\n 2 : \n 3" - formats "foo(a: //, b: //)" formats "foo(a: //, b: //)" - formats "1.>=(2) { 3 }" formats "1.>=(2) { 3 }" - formats "{% if z %}\n 1\n{% end %}\n\ndef foo\n z =\n 123 + # foo\n 4 # bar\n\n 1\nend" formats "{% if z %}\n 1\n{% end %}\n\ndef foo\n z =\n 123 + # foo\n 4 # bar\n\n 1\nend" - formats "a &.b.c.as C" formats "a &.b.c.as C" - formats "lib Foo\n $foo = hello : Int32 \nend" formats "lib Foo\n $foo = hello : Int32 \nend" - formats "[\n1, # a\n2, # b\n 3 # c\n]" formats "[\n1, # a\n2, # b\n 3 # c\n]" - formats "if 1\nelse\n2 # foo\nend" formats "if 1\nelse\n2 # foo\nend" - formats "{ %w() }" formats "{ %w() }" - formats "def foo(x) # bar\n # baz\nend" formats "def foo(x) # bar\n # baz\nend" - formats "begin\n #hola\n 1\nend\n" formats "begin\n #hola\n 1\nend\n" - formats "Set{ # foo\n 1,\n}" formats "Set{ # foo\n 1,\n}" - formats "a = 1\ndef bar\nend" formats "a = 1\ndef bar\nend" - formats "[\n # foo\n] of String" formats "[\n # foo\n] of String" - formats "def foo(x : (self)?)\nend" formats "def foo(x : (self)?)\nend" - formats "{ 1 => 2 ,\n 3 => 4 }" formats "{ 1 => 2 ,\n 3 => 4 }" - formats "macro foo # bar\n baz\nend" formats "macro foo # bar\n baz\nend" - formats "return( 1 , 2 )" formats "return( 1 , 2 )" - formats ":\"foo bar\"" formats ":\"foo bar\"" - formats "foo(\n <<-HERE,\n hello\n HERE\n # foo\n foo: 1,\n)" formats "foo(\n <<-HERE,\n hello\n HERE\n # foo\n foo: 1,\n)" - formats "x : (A -> B)" formats "x : (A -> B)" - formats "while 1 # foo\n # bar\n 2\nend" formats "while 1 # foo\n # bar\n 2\nend" - formats "alias Foo =Bar" formats "alias Foo =Bar" - formats "foo.as Int32*" formats "foo.as Int32*" - formats "/foo/imx" formats "/foo/imx" - formats "%i{one( two( three)}" formats "%i{one( two( three)}" - formats "::NamedTuple(T)" formats "::NamedTuple(T)" - formats "foo { |x| (x).a }" formats "foo { |x| (x).a }" - formats "def foo(\n foo,\n @[MyAnn] &block\n); end" formats "def foo(\n foo,\n @[MyAnn] &block\n); end" - formats "[\n a(), # b\n]" formats "[\n a(), # b\n]" - formats "1 && 2" formats "1 && 2" - formats "foo(\n 1, 2, &block)" formats "foo(\n 1, 2, &block)" - formats "(1 .. )" formats "(1 .. )" - formats "<<-HTML\n hello \n HTML" formats "<<-HTML\n hello \n HTML" - formats " .. 2" formats " .. 2" - formats "1 + \\\n2" formats "1 + \\\n2" - formats "if 1\nbegin\n2\nensure\n3\nend\nend" formats "if 1\nbegin\n2\nensure\n3\nend\nend" - formats "# foo\na = 1 # bar" formats "# foo\na = 1 # bar" - formats "while 1;\n2; end" formats "while 1;\n2; end" - formats "def foo(**b, # comment\n &block)\nend" formats "def foo(**b, # comment\n &block)\nend" - formats "foo.[]( 1 , 2 )" formats "foo.[]( 1 , 2 )" - formats "foo(1 ||\n # foo\n 2)" formats "foo(1 ||\n # foo\n 2)" - formats "{ \"foo\" => 1 }" formats "{ \"foo\" => 1 }" - formats "if 1\n foo(\n bar,\n # comment\n )\nend" formats "if 1\n foo(\n bar,\n # comment\n )\nend" - formats "if a\n b &c\nend" formats "if a\n b &c\nend" - formats "return { {1, 2}, {3, 4} }" formats "return { {1, 2}, {3, 4} }" - formats "foo[x: 1, &.bar] ||= 1" formats "foo[x: 1, &.bar] ||= 1" - formats "if 1\n1\n\n# foo\nend" formats "if 1\n1\n\n# foo\nend" - formats "foo : Foo*****" formats "foo : Foo*****" - formats "run(\"a\", 1)" formats "run(\"a\", 1)" - formats "x.try &.[] 123" formats "x.try &.[] 123" - formats "macro foo( x , y )\nend" formats "macro foo( x , y )\nend" - formats "include Foo" formats "include Foo" - formats "instance_sizeof( Int32 )" formats "instance_sizeof( Int32 )" - formats "begin\n array[\n 0, # Zero\n ]\nend" formats "begin\n array[\n 0, # Zero\n ]\nend" - formats "abstract def foo \n 1" formats "abstract def foo \n 1" - formats "if # some comment\n 2 # another\n 3 # final \n end # end " formats "if # some comment\n 2 # another\n 3 # final \n end # end " - formats "case\nend" formats "case\nend" - formats "%x(foo \#{ bar })" formats "%x(foo \#{ bar })" - formats "1 / 2" formats "1 / 2" - formats "def foo\n1\nensure\n2\nend" formats "def foo\n1\nensure\n2\nend" - formats "begin 0[1] rescue 2 end" formats "begin 0[1] rescue 2 end" - formats "#!shebang\n1 + 2" formats "#!shebang\n1 + 2" - formats "def foo ( x : Int32 = 1 ) \n end" formats "def foo ( x : Int32 = 1 ) \n end" - formats "-> : Int32 | String { 1 }" formats "-> : Int32 | String { 1 }" - formats "foo(\n 1,\n # 2,\n # 3,\n)" formats "foo(\n 1,\n # 2,\n # 3,\n)" - formats "foo do | x , y | \n x \n end" formats "foo do | x , y | \n x \n end" - formats "a = if 1\n2\nelsif 3\n4\nend" formats "a = if 1\n2\nelsif 3\n4\nend" - formats "1 + \\\n2 + \\\n3" formats "1 + \\\n2 + \\\n3" - formats "$1?" formats "$1?" - formats "foo[a, b: 2]" formats "foo[a, b: 2]" - formats "while 1 # foo\nend" formats "while 1 # foo\nend" - formats " <<-EOF\n 1\n 2\n EOF" formats " <<-EOF\n 1\n 2\n EOF" - formats "-> { }" formats "-> { }" - formats "1 rescue 2" formats "1 rescue 2" - formats "def foo\n@x : Int32\nend" formats "def foo\n@x : Int32\nend" - formats "asm(\"a\" : : :: \"volatile\")" formats "asm(\"a\" : : :: \"volatile\")" - formats " <<-HTML\n \#{1}\n HTML" formats " <<-HTML\n \#{1}\n HTML" - formats "{ {{FOO}}, nil}" formats "{ {{FOO}}, nil}" - formats "->foo=" formats "->foo=" - adds `&` to yielding methods that don't have a block parameter (#8764) - formats "def foo(a, **b)\n yield\nend" formats "def foo(a, **b)\n yield\nend" - formats "def foo # bar\n yield\nend" formats "def foo # bar\n yield\nend" - formats "def foo(x\n)\n yield\nend" formats "def foo(x\n)\n yield\nend" - formats "def foo\n yield\nend" formats "def foo\n yield\nend" - formats "macro f\n yield\n {{ yield }}\nend" formats "macro f\n yield\n {{ yield }}\nend" - formats "def foo(\nx,\n)\n yield\nend" formats "def foo(\nx,\n)\n yield\nend" - formats "def foo(\nx)\n yield\nend" formats "def foo(\nx)\n yield\nend" - formats "def foo(x,\ny)\n yield\nend" formats "def foo(x,\ny)\n yield\nend" - formats "def foo(\nx,\ny)\n yield\nend" formats "def foo(\nx,\ny)\n yield\nend" - formats "def foo(x,\ny,)\n yield\nend" formats "def foo(x,\ny,)\n yield\nend" - formats "def foo(\nx, y)\n yield\nend" formats "def foo(\nx, y)\n yield\nend" - formats "def foo(\n)\n yield\nend" formats "def foo(\n)\n yield\nend" - formats "def foo(x ,)\n yield\nend" formats "def foo(x ,)\n yield\nend" - formats "def foo(x)\n yield\nend" formats "def foo(x)\n yield\nend" - formats "def foo(x,\n)\n yield\nend" formats "def foo(x,\n)\n yield\nend" - formats "def foo()\n yield\nend" formats "def foo()\n yield\nend" - formats "1 &&\n2 &&\n3" formats "1 &&\n2 &&\n3" - formats " <<-HTML\n foo\nHTML" formats " <<-HTML\n foo\nHTML" - formats "# Hello\n#\n# ```cr\n# 1\n# ```\n# Bye" formats "# Hello\n#\n# ```cr\n# 1\n# ```\n# Bye" - formats "asm(\"a\" :: \"d\"(e)\n)" formats "asm(\"a\" :: \"d\"(e)\n)" - formats "1 # foo\n2 # bar" formats "1 # foo\n2 # bar" - formats "@foo : Int32 # comment\n\ndef foo\nend" formats "@foo : Int32 # comment\n\ndef foo\nend" - formats "yield( 1 )" formats "yield( 1 )" - formats "a = 1\na ||= begin\n 1\nend" formats "a = 1\na ||= begin\n 1\nend" - formats "begin\n # Comment\n\n\nend" formats "begin\n # Comment\n\n\nend" - formats "foo[1, &.bar] = 1" formats "foo[1, &.bar] = 1" - formats "break 1" formats "break 1" - formats "1.==() { 3 }" formats "1.==() { 3 }" - formats "x : A?" formats "x : A?" - formats "foo( )" formats "foo( )" - formats "struct Foo \n\n 1 \n\nend" formats "struct Foo \n\n 1 \n\nend" - formats "\n# hello\n\n\n1" formats "\n# hello\n\n\n1" - formats "foo.[]=( 1 , 2 , 3 )" formats "foo.[]=( 1 , 2 , 3 )" - formats "as? Foo" formats "as? Foo" - formats "def foo\n# hello\n1\nend" formats "def foo\n# hello\n1\nend" - formats "x : (A -> B)?" formats "x : (A -> B)?" - formats "# ```text\n# 1 + 2\n# ```" formats "# ```text\n# 1 + 2\n# ```" - formats "a = b = 1\na, b =\n b, a" formats "a = b = 1\na, b =\n b, a" - formats "# Hello\n#\n# ```crystal\n# 1\n# ```\n# Bye" formats "# Hello\n#\n# ```crystal\n# 1\n# ```\n# Bye" - formats "foo[] =1" formats "foo[] =1" - formats "asm(\"nop\" : \"a\"(0) )" formats "asm(\"nop\" : \"a\"(0) )" - formats "foo : A(B)\nbar : C" formats "foo : A(B)\nbar : C" - formats ":&-" formats ":&-" - formats "def foo ( ) \n1\nend" formats "def foo ( ) \n1\nend" - formats "module Moo ( T )\nend" formats "module Moo ( T )\nend" - formats "asm(\"a\" : \"b\"(c)\n)" formats "asm(\"a\" : \"b\"(c)\n)" - formats "lib Bar\n enum Foo\n A = 1\n end\nend" formats "lib Bar\n enum Foo\n A = 1\n end\nend" - formats "module Foo ( U, *T ); 1; end" formats "module Foo ( U, *T ); 1; end" - formats "def foo(\n a,\n &block\n)\nend" formats "def foo(\n a,\n &block\n)\nend" - formats "if 1\nelse\n2\nend\n3" formats "if 1\nelse\n2\nend\n3" - formats "\"\" + <<-END\n bar\n END" formats "\"\" + <<-END\n bar\n END" - formats "def foo ( bar @@select) \n end" formats "def foo ( bar @@select) \n end" - formats "Union(Int32, String)?" formats "Union(Int32, String)?" - formats "->foo" formats "->foo" - formats "def foo\n case x\n # z\n when 1\n end\nend" formats "def foo\n case x\n # z\n when 1\n end\nend" - formats "def a\n {\n 1, # x\n # y\n }\nend" formats "def a\n {\n 1, # x\n # y\n }\nend" - formats "case 1\nwhen \"foo\" ; 3\nwhen \"lalalala\"; 4\nelse 5\nend" formats "case 1\nwhen \"foo\" ; 3\nwhen \"lalalala\"; 4\nelse 5\nend" - formats "if 1\n [\n 1,\n ].none?\nend" formats "if 1\n [\n 1,\n ].none?\nend" - formats "[\n a(),\n]" formats "[\n a(),\n]" - formats "foo &.nil?()" formats "foo &.nil?()" - formats "\"foo\" \\\n \"bar\"" formats "\"foo\" \\\n \"bar\"" - formats "def foo(x)\n {% if true %}\n x = x + 2\n {% end %}\nend" formats "def foo(x)\n {% if true %}\n x = x + 2\n {% end %}\nend" - formats "x, y = <<-FOO, <<-BAR\n hello\n FOO\n world\n BAR" formats "x, y = <<-FOO, <<-BAR\n hello\n FOO\n world\n BAR" - formats "Hash{\n foo => <<-EOF,\n foo\n EOF\n}" formats "Hash{\n foo => <<-EOF,\n foo\n EOF\n}" - formats "macro bar\n 1\nend\n\ncase 1\nwhen 2 then 3\nwhen 45 then 6\nend" formats "macro bar\n 1\nend\n\ncase 1\nwhen 2 then 3\nwhen 45 then 6\nend" - formats "lib Foo\n fun bar = Bar\nend" formats "lib Foo\n fun bar = Bar\nend" - formats "<<-FOO\n1\nFOO\n\n{\n 1 => 2,\n 10 => 3,\n}" formats "<<-FOO\n1\nFOO\n\n{\n 1 => 2,\n 10 => 3,\n}" - formats "a(&.b.c.as C)" formats "a(&.b.c.as C)" - formats "macro foo\n {% if 1 %} 2 {% end %}\nend" formats "macro foo\n {% if 1 %} 2 {% end %}\nend" - formats "@[ Foo ]\ndef foo\nend" formats "@[ Foo ]\ndef foo\nend" - formats "def foo(\n **a\n)\n 1\nend" formats "def foo(\n **a\n)\n 1\nend" - formats "$~" formats "$~" - formats "if 1\n {{1 + 2}}\nend" formats "if 1\n {{1 + 2}}\nend" - formats "foo\n .bar\n .baz(\n 1\n )" formats "foo\n .bar\n .baz(\n 1\n )" - formats "case 1 \n when 2 \n 3 \n end" formats "case 1 \n when 2 \n 3 \n end" - formats "def foo(@x)\n\nrescue\nend" formats "def foo(@x)\n\nrescue\nend" - formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\\v\\f\\e\"" formats "\"\\\\\\\"\\#\\a\\b\\n\\r\\t\\v\\f\\e\"" - formats "foo(out x)" formats "foo(out x)" - formats "def foo ( x : Int32 ) \n end" formats "def foo ( x : Int32 ) \n end" - formats "case foo\nwhen 1\n # A\nelse\n# B\nend\n" formats "case foo\nwhen 1\n # A\nelse\n# B\nend\n" - formats "long_variable_name = [{\n :foo => 1,\n}, {\n :bar => 2,\n}]" formats "long_variable_name = [{\n :foo => 1,\n}, {\n :bar => 2,\n}]" - formats "{ 1 => 2 ,\n\n 3 => 4 }" formats "{ 1 => 2 ,\n\n 3 => 4 }" - formats "enum Foo\n {% begin %}\n A\n B\n C\n {% end %}\nend" formats "enum Foo\n {% begin %}\n A\n B\n C\n {% end %}\nend" - formats "macro foo(x, *, z)\nend" formats "macro foo(x, *, z)\nend" - formats "args.any? &.name.baz" formats "args.any? &.name.baz" - formats "asm(\"a\" :: : : \"volatile\")" formats "asm(\"a\" :: : : \"volatile\")" - formats "yield (1).foo" formats "yield (1).foo" - formats "foo(&.bar)" formats "foo(&.bar)" - formats "if a\nelse\n2\nend" formats "if a\nelse\n2\nend" - formats "foo(/ /)" formats "foo(/ /)" - formats ":foo" formats ":foo" - formats "@[Foo(\n 1,\n)]" formats "@[Foo(\n 1,\n)]" - formats "foo = 1\n->foo.[]=(Int32)" formats "foo = 1\n->foo.[]=(Int32)" - formats "foo : self?" formats "foo : self?" - formats "macro foo\n {% if 1 %}\\ 2 {% else %}\\ 3 {% end %}\\\nend" formats "macro foo\n {% if 1 %}\\ 2 {% else %}\\ 3 {% end %}\\\nend" - formats "foo[&.bar] ||= 1" formats "foo[&.bar] ||= 1" - formats "-> do\nend" formats "-> do\nend" - formats "begin\n1\nrescue\n3\nensure\n2\nend" formats "begin\n1\nrescue\n3\nensure\n2\nend" - formats "->Foo.foo" formats "->Foo.foo" - formats "\n# hello\n1" formats "\n# hello\n1" - formats "foo(\n a: 1,\n b: 2,\n )\n" formats "foo(\n a: 1,\n b: 2,\n )\n" - formats "x : { {A, B}, {C, D} }" formats "x : { {A, B}, {C, D} }" - formats "foo(\n 1,\n # 2,\n 3,\n)" formats "foo(\n 1,\n # 2,\n 3,\n)" - formats "alias A = (B(C, (C | D)) | E)" formats "alias A = (B(C, (C | D)) | E)" - formats "a = foo(bar(baz3 do\nend))" formats "a = foo(bar(baz3 do\nend))" - formats "foo(\n [\n 1,\n 2,\n ],\n [\n 3,\n 4,\n ]\n)" formats "foo(\n [\n 1,\n 2,\n ],\n [\n 3,\n 4,\n ]\n)" - formats "def foo(@[MyAnn] & : String -> Nil); end" formats "def foo(@[MyAnn] & : String -> Nil); end" - formats "0x1234_u32" formats "0x1234_u32" - formats "foo a , *b" formats "foo a , *b" - formats "abstract class Foo\nend" formats "abstract class Foo\nend" - formats "foo{|x|\n x}" formats "foo{|x|\n x}" - formats "def foo(**a,)\n 1\nend" formats "def foo(**a,)\n 1\nend" - formats "foo &.bar do\n 1 + 2\nend" formats "foo &.bar do\n 1 + 2\nend" - formats "return 1" formats "return 1" - formats "alias A = ((B(C | D) | E) | F)" formats "alias A = ((B(C | D) | E) | F)" - formats "select \n when foo \n 2 \n when bar \n 3 \n end" formats "select \n when foo \n 2 \n when bar \n 3 \n end" - formats "foo : ( A | B )" formats "foo : ( A | B )" - formats "long_variable_name = [1, 2, 3,\n 4, 5, 6]" formats "long_variable_name = [1, 2, 3,\n 4, 5, 6]" - formats "x = uninitialized Foo\n{% begin %}\n x = foo(x)\n{% end %}" formats "x = uninitialized Foo\n{% begin %}\n x = foo(x)\n{% end %}" - formats "foo(\n# x\n1,\n\n# y\nz: 2\n)" formats "foo(\n# x\n1,\n\n# y\nz: 2\n)" - formats "a[b] ||= c" formats "a[b] ||= c" - formats "asm(\"a\" : : : : \"volatile\")" formats "asm(\"a\" : : : : \"volatile\")" - formats "X(typeof(begin\n e.is_a?(Y) ? 1 : 2\nend))" formats "X(typeof(begin\n e.is_a?(Y) ? 1 : 2\nend))" - formats "1 ensure 2" formats "1 ensure 2" - formats "foo(bar(\n 1,\n 2,\n))" formats "foo(bar(\n 1,\n 2,\n))" - formats "<<-FOO\n\#{\"foo\"}\nFOO" formats "<<-FOO\n\#{\"foo\"}\nFOO" - formats "Foo:: Bar" formats "Foo:: Bar" - formats "case 1\nwhen 2\n\n#comment\nend" formats "case 1\nwhen 2\n\n#comment\nend" - formats "alias Foo::Bar= Baz" formats "alias Foo::Bar= Baz" - formats "/ /" formats "/ /" - formats "def a\n b(\n 1, # x\n # y\n )\nend" formats "def a\n b(\n 1, # x\n # y\n )\nend" - formats "{ {foo: 2} }" formats "{ {foo: 2} }" - formats "a-1" formats "a-1" - formats "def +(x)\nend" formats "def +(x)\nend" - formats "case 1\nend" formats "case 1\nend" - formats "[\n <<-EOF,\n foo\n EOF\n <<-BAR,\n bar\n BAR\n]" formats "[\n <<-EOF,\n foo\n EOF\n <<-BAR,\n bar\n BAR\n]" - formats "return 1 , 2" formats "return 1 , 2" - formats "<<-FOO\n\#{\"foo\"}bar\nFOO" formats "<<-FOO\n\#{\"foo\"}bar\nFOO" - formats "#### ###" formats "#### ###" - formats "X(typeof(begin\n e.is_a?(Y)\nend))" formats "X(typeof(begin\n e.is_a?(Y)\nend))" - formats "{% if z %}\n class Foo\n end\n{% end %}" formats "{% if z %}\n class Foo\n end\n{% end %}" - formats "foo &.responds_to?(:foo)" formats "foo &.responds_to?(:foo)" - formats "\"\#{foo = 1\n}\"" formats "\"\#{foo = 1\n}\"" - formats "def foo(a : T, b : U) forall T, U\n #\nend" formats "def foo(a : T, b : U) forall T, U\n #\nend" - formats "@[ Foo(foo: 1) ]\ndef foo\nend" formats "@[ Foo(foo: 1) ]\ndef foo\nend" - formats "a = %w(\n one two\n three four\n)" formats "a = %w(\n one two\n three four\n)" - formats "return 1, {2, 3}" formats "return 1, {2, 3}" - formats "[/ /, / /]" formats "[/ /, / /]" - formats "! 1" formats "! 1" - formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n @[MyAnn] baz,\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n @[MyAnn] baz,\n); end" - formats "unless a\n2\nelse\nend" formats "unless a\n2\nelse\nend" - formats "\"\#{\"\#{foo}\"}\"" formats "\"\#{\"\#{foo}\"}\"" - formats "case 1 \n when 2 \n 3 \n else \n 4 \n end" formats "case 1 \n when 2 \n 3 \n else \n 4 \n end" - formats "foo[]" formats "foo[]" - formats "-> :: Foo . foo!" formats "-> :: Foo . foo!" - formats "def foo(@[AnnOne] @[AnnTwo] &block : Int32 -> ); end" formats "def foo(@[AnnOne] @[AnnTwo] &block : Int32 -> ); end" - formats "foo[1, &.bar]?" formats "foo[1, &.bar]?" - formats "return( *1 , *2 )" formats "return( *1 , *2 )" - formats "(())" formats "(())" - formats "def foo: Int32\nend" formats "def foo: Int32\nend" - formats "x = <<-FOO\n hello\n FOO\n\ndef bar\nend" formats "x = <<-FOO\n hello\n FOO\n\ndef bar\nend" - formats "foo.bar(&.%(baz))" formats "foo.bar(&.%(baz))" - formats "foo(bar(\n 1,\n baz(\n 2,\n 3,\n )\n))" formats "foo(bar(\n 1,\n baz(\n 2,\n 3,\n )\n))" - formats "\"hello\"" formats "\"hello\"" - formats "foo &.[]" formats "foo &.[]" - formats "0i64" formats "0i64" - formats " <<-EOF\n 1\nEOF" formats " <<-EOF\n 1\nEOF" - formats "if 1\n2 # foo\nend" formats "if 1\n2 # foo\nend" - formats "foo([\n 1,\n 2,\n 3,\n])" formats "foo([\n 1,\n 2,\n 3,\n])" - formats "if 1\n node.is_a?(T)\nend" formats "if 1\n node.is_a?(T)\nend" - formats "x.try &.[]= 123, 456" formats "x.try &.[]= 123, 456" - formats "asm(\"a\" ::: \"a\"\n : \"volatile\",\n \"intel\")" formats "asm(\"a\" ::: \"a\"\n : \"volatile\",\n \"intel\")" - formats "def foo(\n @[MyAnn]\n bar,\n); end" formats "def foo(\n @[MyAnn]\n bar,\n); end" - formats " {%\na = 1 %}" formats " {%\na = 1 %}" - formats "begin\n ()\nend" formats "begin\n ()\nend" - formats "next *1 , *2" formats "next *1 , *2" - adds trailing comma to def multi-line normal, splat, and double splat parameters - formats "def foo(\n a, # Foo\n b # Bar\n)\nend" formats "def foo(\n a, # Foo\n b # Bar\n)\nend" - formats "def foo(a, b)\nend" formats "def foo(a, b)\nend" - formats "def foo(a, **kwargs, &block)\nend" formats "def foo(a, **kwargs, &block)\nend" - formats "def foo(a, &block)\nend" formats "def foo(a, &block)\nend" - formats "macro foo(\n a,\n *b\n)\nend" formats "macro foo(\n a,\n *b\n)\nend" - formats "def foo(\n a,\n @[Ann]\n b\n)\nend" formats "def foo(\n a,\n @[Ann]\n b\n)\nend" - formats "fun foo(\n a : Int32,\n ...\n)\nend" formats "fun foo(\n a : Int32,\n ...\n)\nend" - formats "def foo(\n a,\n &block\n)\nend" formats "def foo(\n a,\n &block\n)\nend" - formats "def foo(\n a : Int32,\n b : Int32 = 1\n)\nend" formats "def foo(\n a : Int32,\n b : Int32 = 1\n)\nend" - formats "def foo(\n a,\n)\nend" formats "def foo(\n a,\n)\nend" - formats "def foo(a, **kwargs)\nend" formats "def foo(a, **kwargs)\nend" - formats "macro foo(\n a,\n b\n)\nend" formats "macro foo(\n a,\n b\n)\nend" - formats "def foo(\n a, b\n)\nend" formats "def foo(\n a, b\n)\nend" - formats "def foo(\n a,\n *b\n)\nend" formats "def foo(\n a,\n *b\n)\nend" - formats "def foo(\n a,\n b\n)\nend" formats "def foo(\n a,\n b\n)\nend" - formats "def foo(\n a,\n @[Ann] b\n)\nend" formats "def foo(\n a,\n @[Ann] b\n)\nend" - formats "fun foo(\n a : Int32,\n b : Int32\n)\nend" formats "fun foo(\n a : Int32,\n b : Int32\n)\nend" - formats "def foo(a)\nend" formats "def foo(a)\nend" - formats "def foo(\n a,\n **b\n)\nend" formats "def foo(\n a,\n **b\n)\nend" - formats "def foo(a, *args)\nend" formats "def foo(a, *args)\nend" - formats "def foo(\n a, b,\n c, d\n)\nend" formats "def foo(\n a, b,\n c, d\n)\nend" - formats "def foo(\n a : Int32,\n b : Int32\n)\nend" formats "def foo(\n a : Int32,\n b : Int32\n)\nend" - formats "def foo(a, *args, &block)\nend" formats "def foo(a, *args, &block)\nend" - formats "def foo(\n a,\n b c\n)\nend" formats "def foo(\n a,\n b c\n)\nend" - formats "foo 1, a: 1,\nb: 2,\nc: 3,\n&block" formats "foo 1, a: 1,\nb: 2,\nc: 3,\n&block" - formats "module Moo \n\n 1 \n\nend" formats "module Moo \n\n 1 \n\nend" - formats "unless a\n2\n3\nend" formats "unless a\n2\n3\nend" - formats "def foo\n 1\nend\n\n# Comment\n\ndef bar\n 2\nend" formats "def foo\n 1\nend\n\n# Comment\n\ndef bar\n 2\nend" - formats "begin\n begin\n\n end\nend" formats "begin\n begin\n\n end\nend" - formats "NamedTuple()" formats "NamedTuple()" - formats "1 if 2" formats "1 if 2" - formats " <<-HTML\n foo\n HTML" formats " <<-HTML\n foo\n HTML" - formats "class Foo\n1\n\n# foo\nend" formats "class Foo\n1\n\n# foo\nend" - formats "1\n\n\n2" formats "1\n\n\n2" - formats "def foo(x, *, z)\nend" formats "def foo(x, *, z)\nend" - formats "\"foo \#{ __DIR__ }\"" formats "\"foo \#{ __DIR__ }\"" - formats " {{ 1 + 2 }}" formats " {{ 1 + 2 }}" - formats "\"1\#{\"4\#{\"\#{\"2\"}\"}3\"}3\#{__DIR__}4\#{5}6\"" formats "\"1\#{\"4\#{\"\#{\"2\"}\"}3\"}3\#{__DIR__}4\#{5}6\"" - formats "{\n variables => true,\n query => <<-HEREDOC,\n foo\n HEREDOC\n foo => true,\n}" formats "{\n variables => true,\n query => <<-HEREDOC,\n foo\n HEREDOC\n foo => true,\n}" - formats "if 1\n ((1) + 2)\nend" formats "if 1\n ((1) + 2)\nend" - formats "a &.b.c.as(C)" formats "a &.b.c.as(C)" - formats "macro foo\n \\{\nend" formats "macro foo\n \\{\nend" - formats "macro foo\n {%1 + 2%}\\\nend" formats "macro foo\n {%1 + 2%}\\\nend" - formats "[\n a() # b\n]" formats "[\n a() # b\n]" - formats "foo(\n 1,\n) {\n 2\n}" formats "foo(\n 1,\n) {\n 2\n}" - formats "Foo( )" formats "Foo( )" - formats "foo . bar( x , y )" formats "foo . bar( x , y )" - formats "<<-HTML\n \#{\"foo\"}\#{1}\n HTML" formats "<<-HTML\n \#{\"foo\"}\#{1}\n HTML" - formats "break {1, 2}, 3" formats "break {1, 2}, 3" - formats " 1" formats " 1" - formats "join io, &.inspect" formats "join io, &.inspect" - formats "a = foo(bar([\n 1,\n]))" formats "a = foo(bar([\n 1,\n]))" - formats "a, b = \nif 1\n2\nend" formats "a, b = \nif 1\n2\nend" - formats "{ 1 => 2 }" formats "{ 1 => 2 }" - formats "x : (A -> )" formats "x : (A -> )" - formats "def foo\n2 # foo\nend" formats "def foo\n2 # foo\nend" - formats "foo &.bar.responds_to?(:baz)" formats "foo &.bar.responds_to?(:baz)" - formats "FOO = 2\nA = 1" formats "FOO = 2\nA = 1" - formats "require \"foo\"" formats "require \"foo\"" - formats "->{}" formats "->{}" - formats "1..\n2" formats "1..\n2" - formats "asm(\"nop\" :: )" formats "asm(\"nop\" :: )" - formats ":>>" formats ":>>" - formats "foo . bar = 1" formats "foo . bar = 1" - formats "Union(Foo::Bar?, Baz?, Qux(T, U?))" formats "Union(Foo::Bar?, Baz?, Qux(T, U?))" - formats "def foo\n <<-FOO\n foo \#{1}\n FOO\nend" formats "def foo\n <<-FOO\n foo \#{1}\n FOO\nend" - formats "if 1 # foo\n2\nend" formats "if 1 # foo\n2\nend" - formats "macro foo\n {% if 1 %} 2 {% elsif 3 %} 4 {% else %} 5 {% end %}\nend" formats "macro foo\n {% if 1 %} 2 {% elsif 3 %} 4 {% else %} 5 {% end %}\nend" - formats "foo(\n 1,\n) do\n 2\nend" formats "foo(\n 1,\n) do\n 2\nend" - formats "#######" formats "#######" - formats "def foo(x)\n self // x\nend" formats "def foo(x)\n self // x\nend" - formats "case 1\nwhen 1, # 1\n 2, # 2\n 3 # 3\n 1\nend" formats "case 1\nwhen 1, # 1\n 2, # 2\n 3 # 3\n 1\nend" - formats "case\nelse\n 1\nend" formats "case\nelse\n 1\nend" - formats "def foo(x)\n case 1\n when self // 2\n 3\n end\nend" formats "def foo(x)\n case 1\n when self // 2\n 3\n end\nend" - formats "{ {% begin %}1{% end %}, nil }" formats "{ {% begin %}1{% end %}, nil }" - formats "case 1\nwhen 2\n 3\n # foo\nelse\n 4\n # bar\nend" formats "case 1\nwhen 2\n 3\n # foo\nelse\n 4\n # bar\nend" - formats "foo = [1, [2,\n 3],\n 4]" formats "foo = [1, [2,\n 3],\n 4]" - formats "\n# hello\n\n1" formats "\n# hello\n\n1" - formats "break( 1 , 2 )" formats "break( 1 , 2 )" - formats "foo.[] =1" formats "foo.[] =1" - formats "foo 1 , 2" formats "foo 1 , 2" - formats "a = \"\n\"\n1 # 1\n12 # 2\n" formats "a = \"\n\"\n1 # 1\n12 # 2\n" - formats "<<-HEREDOC\n \#{foo}\n H\#{bar}\n HEREDOC" formats "<<-HEREDOC\n \#{foo}\n H\#{bar}\n HEREDOC" - formats "-> :: foo=" formats "-> :: foo=" - formats "foo.bar += \n1" formats "foo.bar += \n1" - formats "{ {1}.foo, 2 }" formats "{ {1}.foo, 2 }" - formats "def foo ( &@block) \n end" formats "def foo ( &@block) \n end" - formats "foo(1, 2, {\n foo: 1,\n bar: 2,\n})" formats "foo(1, 2, {\n foo: 1,\n bar: 2,\n})" - formats "case 1\nwhen 1 then 1\nwhen 123 then 2\nwhen 1..123 then 3\nelse 4\nend" formats "case 1\nwhen 1 then 1\nwhen 123 then 2\nwhen 1..123 then 3\nelse 4\nend" - formats "class Foo\ndef foo (\nx ,\n y ) \n end\nend" formats "class Foo\ndef foo (\nx ,\n y ) \n end\nend" - formats "def foo ( x ) \n end" formats "def foo ( x ) \n end" - formats "foo(\n1,\n\n 2 \n)" formats "foo(\n1,\n\n 2 \n)" - formats "1.=== do\nend" formats "1.=== do\nend" - formats "{ # foo\n 1,\n}" formats "{ # foo\n 1,\n}" - formats "macro foo\n {% 1 + 2 %}\nend" formats "macro foo\n {% 1 + 2 %}\nend" - formats "foo &.[]=( 1, 2 )" formats "foo &.[]=( 1, 2 )" - formats "def foo(\n @[MyAnn] bar\n); end" formats "def foo(\n @[MyAnn] bar\n); end" - formats "1 # foo\n/ \#{1} /" formats "1 # foo\n/ \#{1} /" - formats "{\n 1 => 2,\n 10 => 30,\n 30 => 40,\n \"foobar\" => 50,\n \"coco\" => 60,\n}" formats "{\n 1 => 2,\n 10 => 30,\n 30 => 40,\n \"foobar\" => 50,\n \"coco\" => 60,\n}" - formats "def foo\n1\nend" formats "def foo\n1\nend" - formats "foo 1, a: 1,\nb: 2,\nc: 3" formats "foo 1, a: 1,\nb: 2,\nc: 3" - formats "foo(\n 1,\n a: 1,\n b: 2,\n)" formats "foo(\n 1,\n a: 1,\n b: 2,\n)" - formats "foo[1, &.bar]" formats "foo[1, &.bar]" - formats "(size - 1).downto(0) do |i|\n yield @buffer[i]\nend" formats "(size - 1).downto(0) do |i|\n yield @buffer[i]\nend" - formats "alias A = (B) -> C" formats "alias A = (B) -> C" - formats "def foo(x)\n case self // x\n when 2\n 3\n end\nend" formats "def foo(x)\n case self // x\n when 2\n 3\n end\nend" - formats "yield( *1 , *2 )" formats "yield( *1 , *2 )" - formats "def foo\n 1\n #\nrescue\nend" formats "def foo\n 1\n #\nrescue\nend" - formats "foo a , b , x: 1" formats "foo a , b , x: 1" - formats "foo : (String -> String?) | (String)" formats "foo : (String -> String?) | (String)" - formats "instance_alignof( Int32 )" formats "instance_alignof( Int32 )" - formats "sizeof( Int32 )" formats "sizeof( Int32 )" - formats "begin\nend\n\n# a\n" formats "begin\nend\n\n# a\n" - formats "break *1 ,2" formats "break *1 ,2" - formats "if 1;\n2;\nelsif 3;\n4;\nend" formats "if 1;\n2;\nelsif 3;\n4;\nend" - formats "__FILE__" formats "__FILE__" - formats "foo \\\n 1,\n 2\n\nbar \\\n foo: 1,\n bar: 2" formats "foo \\\n 1,\n 2\n\nbar \\\n foo: 1,\n bar: 2" - formats "a = / /" formats "a = / /" - formats "class Foo\nend\nclass Bar\nend" formats "class Foo\nend\nclass Bar\nend" - formats "1 + \\\n2\n3" formats "1 + \\\n2\n3" - formats "def foo(x : X) forall X , Y; end" formats "def foo(x : X) forall X , Y; end" - formats "lib Foo\nend" formats "lib Foo\nend" - formats "-> : {x: Int32, y: String} {}" formats "-> : {x: Int32, y: String} {}" - formats ":*" formats ":*" - formats "next" formats "next" - formats "def foo ( x , y ,\n) \n end" formats "def foo ( x , y ,\n) \n end" - formats "begin\n 1\nend\n\n1\n" formats "begin\n 1\nend\n\n1\n" - formats "%i(one two three)" formats "%i(one two three)" - formats "foo do | x | \n x \n end" formats "foo do | x | \n x \n end" - formats "def foo(a : T) forall T \n #\nend" formats "def foo(a : T) forall T \n #\nend" - formats "foo = 1\n->foo.bar(Int32*)" formats "foo = 1\n->foo.bar(Int32*)" - formats "foo : Pointer(Foo)*" formats "foo : Pointer(Foo)*" - formats "foo.bar += 2" formats "foo.bar += 2" - formats "a.b &.[c]?\n1" formats "a.b &.[c]?\n1" - formats "lib Foo\n fun Foo = Bar\nend" formats "lib Foo\n fun Foo = Bar\nend" - formats "alias A = ( A | B )" formats "alias A = ( A | B )" - formats "b &.[c]?.d" formats "b &.[c]?.d" - formats "def foo\n # Comment\n\n\nend" formats "def foo\n # Comment\n\n\nend" - formats "NamedTuple(\n a: Int32,)" formats "NamedTuple(\n a: Int32,)" - formats "...\n2" formats "...\n2" - formats "1 * 2" formats "1 * 2" - formats "@x[ 1 ] &&= 2" formats "@x[ 1 ] &&= 2" - formats "1.>= { 3 }" formats "1.>= { 3 }" - formats "lib Foo\nfun foo () : Int32\nend" formats "lib Foo\nfun foo () : Int32\nend" - formats "macro []=(x, y)\nend" formats "macro []=(x, y)\nend" - formats "foo(\n <<-HERE,\n hello\n HERE\n 1,\n)" formats "foo(\n <<-HERE,\n hello\n HERE\n 1,\n)" - formats "begin\n 1 + \\\n 2\n 3\nend" formats "begin\n 1 + \\\n 2\n 3\nend" - formats "if 1;\n2; end" formats "if 1;\n2; end" - formats "case 1 \n when 2 then \n 3 \n end" formats "case 1 \n when 2 then \n 3 \n end" - formats "begin\n1\nrescue ex\n3\nelse\n4\nend" formats "begin\n1\nrescue ex\n3\nelse\n4\nend" - formats "a = case 1\n when 1, # 1\n 2, # 2\n 3 # 3\n 1\n end" formats "a = case 1\n when 1, # 1\n 2, # 2\n 3 # 3\n 1\n end" - formats "<<-FOO\nbar\#{\"foo\"}\nFOO" formats "<<-FOO\nbar\#{\"foo\"}\nFOO" - formats "begin\n 1\n # Comment\n\n\nend" formats "begin\n 1\n # Comment\n\n\nend" - formats " {% for x in y %} 2 {% end %}" formats " {% for x in y %} 2 {% end %}" - formats "foo : self? | A" formats "foo : self? | A" - formats "alias Foo = Bar" formats "alias Foo = Bar" - formats "def foo(**z, &block)\nend" formats "def foo(**z, &block)\nend" - formats "x : A | B" formats "x : A | B" - formats "1\n.." formats "1\n.." - formats "foo . responds_to? :bar" formats "foo . responds_to? :bar" - formats "foo(1 + \n2)" formats "foo(1 + \n2)" - formats "case 0\nwhen 0 then 1; 2\n# Comments\nend" formats "case 0\nwhen 0 then 1; 2\n# Comments\nend" - formats "1 #foo \n2 #bar" formats "1 #foo \n2 #bar" - formats "asm(\"a\" : \"b\"(1), \"c\"(2) : \"d\"(3) : : \"volatile\")" formats "asm(\"a\" : \"b\"(1), \"c\"(2) : \"d\"(3) : : \"volatile\")" - formats " Array( {x: Int32, y: String } )" formats " Array( {x: Int32, y: String } )" - formats "@x &&= 1" formats "@x &&= 1" - formats "typeof( 1, 2, 3 )" formats "typeof( 1, 2, 3 )" - formats "foo (1; 2)" formats "foo (1; 2)" - formats " [ 1, \n 2 , \n 3 ] " formats " [ 1, \n 2 , \n 3 ] " - formats "asm(\"a\" ::: \"f\"\n)" formats "asm(\"a\" ::: \"f\"\n)" - formats "case nil\nelse nil; nil # comment\nend" formats "case nil\nelse nil; nil # comment\nend" - formats "foo(baz(x, y) do\n 1 + 2\nend)" formats "foo(baz(x, y) do\n 1 + 2\nend)" - formats "{ 1 => 2 , 3 => 4 }" formats "{ 1 => 2 , 3 => 4 }" - formats "if 1\n ->{ 1 }\nend" formats "if 1\n ->{ 1 }\nend" - formats "1\n\n2" formats "1\n\n2" - formats "10 ** a" formats "10 ** a" - formats "@[Foo( 1, 2, foo: 3 )]" formats "@[Foo( 1, 2, foo: 3 )]" - formats "lib Foo\n $foo : Int32 \nend" formats "lib Foo\n $foo : Int32 \nend" - formats "macro foo\n {% for x in y %} 2 {% end %}\nend" formats "macro foo\n {% for x in y %} 2 {% end %}\nend" - formats "def foo(a,\n **b)\nend" formats "def foo(a,\n **b)\nend" - formats "def foo ( x , y ) \n end" formats "def foo ( x , y ) \n end" - formats "[] of (Array(T))" formats "[] of (Array(T))" - formats "[\n 1, 2, # foo\n 3,\n]" formats "[\n 1, 2, # foo\n 3,\n]" - formats "foo = 1\n->foo.bar(Int32)" formats "foo = 1\n->foo.bar(Int32)" - formats "-> :: foo" formats "-> :: foo" - formats "return { 1 , 2 }" formats "return { 1 , 2 }" - formats "lib Foo\nstruct Foo\nx , y , z : Int32\nend\nend" formats "lib Foo\nstruct Foo\nx , y , z : Int32\nend\nend" - formats "lib Foo\nfun foo(x : Int32,\ny : Float64) : Int32\nend" formats "lib Foo\nfun foo(x : Int32,\ny : Float64) : Int32\nend" - formats "def foo ( x ,\n y ) \n end" formats "def foo ( x ,\n y ) \n end" - formats "macro foo=(x)\nend" formats "macro foo=(x)\nend" - formats "enum E\n A # hello\n B # hello; C # hello\nend" formats "enum E\n A # hello\n B # hello; C # hello\nend" - formats "foo\n.bar\n.baz" formats "foo\n.bar\n.baz" - formats "def foo( x , & block : Int32 ->)\nend" formats "def foo( x , & block : Int32 ->)\nend" - formats "1.!= do\nend" formats "1.!= do\nend" - formats ":&*" formats ":&*" - formats "return 1 , *2" formats "return 1 , *2" - formats "\n # hello\n\n1" formats "\n # hello\n\n1" - formats "-> : {Int32} { String }" formats "-> : {Int32} { String }" - formats "[\n# foo\n] of String" formats "[\n# foo\n] of String" - formats "{1, 2, 3}" formats "{1, 2, 3}" - formats "@x[ 1 ] += 2" formats "@x[ 1 ] += 2" - formats "def foo( & \n )\nend" formats "def foo( & \n )\nend" - formats "a = \\\n # foo\n bar(1)" formats "a = \\\n # foo\n bar(1)" - formats "def foo(x) forall T # bar\n # baz\nend" formats "def foo(x) forall T # bar\n # baz\nend" - formats "loop do\n 1\nrescue\n 2\nend" formats "loop do\n 1\nrescue\n 2\nend" - formats "Foo::Bar(T, U?)?" formats "Foo::Bar(T, U?)?" - formats "->{\nx\n}" formats "->{\nx\n}" - formats "def foo(\n a,\n b,\n)\nend" formats "def foo(\n a,\n b,\n)\nend" - formats "def foo(x @y)\nend" formats "def foo(x @y)\nend" - formats "def foo( x , & block )\nend" formats "def foo( x , & block )\nend" - formats "foo . bar" formats "foo . bar" - formats "foo { | a, ( b , c ) | a + b + c }" formats "foo { | a, ( b , c ) | a + b + c }" - formats "def foo(\n foo,\n\n @[MyAnn]\n @[MyAnn]\n & : Nil -> Nil\n); end" formats "def foo(\n foo,\n\n @[MyAnn]\n @[MyAnn]\n & : Nil -> Nil\n); end" - formats "fun foo(\n x : Int32,\n ...\n) : Int32\n 1\nend" formats "fun foo(\n x : Int32,\n ...\n) : Int32\n 1\nend" - formats "1.!=() { 3 }" formats "1.!=() { 3 }" - formats "{\n query => <<-HEREDOC,\n foo\n HEREDOC\n}" formats "{\n query => <<-HEREDOC,\n foo\n HEREDOC\n}" - formats "->: Int32 do\nx\nend" formats "->: Int32 do\nx\nend" - formats "class Foo # foo\nend" formats "class Foo # foo\nend" - formats "->( x , y ) { x }" formats "->( x , y ) { x }" - formats "def a\n b(\n a: 1, # x\n # y\n b: 2\n )\nend" formats "def a\n b(\n a: 1, # x\n # y\n b: 2\n )\nend" - formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" formats "lib Foo\n fun foo = bar(Int32) : Int32\nend" - formats "[1, 2, 3]" formats "[1, 2, 3]" - formats "a = foo(1, 2, {\n foo: 1,\n bar: 2,\n})" formats "a = foo(1, 2, {\n foo: 1,\n bar: 2,\n})" - formats "foo(1, ) do\nend" formats "foo(1, ) do\nend" - formats "foo.%(bar)" formats "foo.%(bar)" - formats "def foo(x : (A | B)) \n end" formats "def foo(x : (A | B)) \n end" - formats "->{1}" formats "->{1}" - formats "case\nend" formats "case\nend" - formats "foo &.[]?(1, 2)" formats "foo &.[]?(1, 2)" - formats "def foo # bar\n # baz\nend" formats "def foo # bar\n # baz\nend" - formats "1 #=>2" formats "1 #=>2" - formats "-> : Int32 {}" formats "-> : Int32 {}" - formats "# ```\n# macro foo\n# 1\n# end\n# ```\n" formats "# ```\n# macro foo\n# 1\n# end\n# ```\n" - formats "return { {1, 2}, {3, 4} }, 5" formats "return { {1, 2}, {3, 4} }, 5" - formats "1&+2&*3" formats "1&+2&*3" - formats "1 && # foo\n 2 &&\n 3" formats "1 && # foo\n 2 &&\n 3" - formats "def foo\n 1\n # Comment\n\n\nend" formats "def foo\n 1\n # Comment\n\n\nend" - formats "{ {% for x in 1..2 %}3{% end %}, nil }" formats "{ {% for x in 1..2 %}3{% end %}, nil }" - formats "def foo(x, **z, &block)\nend" formats "def foo(x, **z, &block)\nend" - formats "if a\n2\nend" formats "if a\n2\nend" - formats "begin\n1\nrescue ex : Int32 \n3\nend" formats "begin\n1\nrescue ex : Int32 \n3\nend" - formats "lib Foo\nfun foo(x : Int32, y : Float64) : Int32\nend" formats "lib Foo\nfun foo(x : Int32, y : Float64) : Int32\nend" - formats "foo(1, / /)" formats "foo(1, / /)" - formats "1 +\n # foo\n 2" formats "1 +\n # foo\n 2" - formats "foo(\n 1, # hola\n2, # chau\n )" formats "foo(\n 1, # hola\n2, # chau\n )" - formats "x: Int32" formats "x: Int32" - formats "def foo(\n **a\n\n # comment\n)\n 1\nend" formats "def foo(\n **a\n\n # comment\n)\n 1\nend" - formats "->( x : Int32 , y ) { x }" formats "->( x : Int32 , y ) { x }" - formats "while true\n1\n\n# foo\nend" formats "while true\n1\n\n# foo\nend" - formats "lib Foo\nstruct Foo\nx : Int32\ny : Float64\nend\nend" formats "lib Foo\nstruct Foo\nx : Int32\ny : Float64\nend\nend" - formats "def foo( x , & block : Int32 )\nend" formats "def foo( x , & block : Int32 )\nend" - formats "foo{}" formats "foo{}" - formats "\"\\a\\c\#{foo}\\b\\d\"" formats "\"\\a\\c\#{foo}\\b\\d\"" - formats "1 ||\n # foo\n 2" formats "1 ||\n # foo\n 2" - formats "if 1;\n2;\nelse;\n3;\nend" formats "if 1;\n2;\nelse;\n3;\nend" - formats "lib Foo\nfun foo( ... ) : Int32\nend" formats "lib Foo\nfun foo( ... ) : Int32\nend" - formats "case 1 \n when 2 \n 3 \n else 4 \n end" formats "case 1 \n when 2 \n 3 \n else 4 \n end" - formats "def foo ( bar @select) \n end" formats "def foo ( bar @select) \n end" - formats "NamedTuple(a: Int32,)" formats "NamedTuple(a: Int32,)" - formats "if 1 # foo\nend" formats "if 1 # foo\nend" - formats "1.as? Int32" formats "1.as? Int32" - formats "10//a" formats "10//a" - formats "def foo( x , & block : ->)\nend" formats "def foo( x , & block : ->)\nend" - formats "a = case 1\nwhen 2\n3\nend" formats "a = case 1\nwhen 2\n3\nend" - formats "foo\n \nbar" formats "foo\n \nbar" - formats "A = 10\nFOO = 123\nBARBAZ = 1234\n" formats "A = 10\nFOO = 123\nBARBAZ = 1234\n" - formats "{ {1, 2, 3} }" formats "{ {1, 2, 3} }" - formats "{ \"foo\": 1 }" formats "{ \"foo\": 1 }" - formats "-> : Int32? {}" formats "-> : Int32? {}" - formats "select\nwhen foo\n # foo\n # bar\nelse\n # foo\n # bar\nend" formats "select\nwhen foo\n # foo\n # bar\nelse\n # foo\n # bar\nend" - formats "[\n 1, 2, # foo\n 3, 4,\n]" formats "[\n 1, 2, # foo\n 3, 4,\n]" - formats "lib Foo\nstruct Foo\nx , y : Int32\nend\nend" formats "lib Foo\nstruct Foo\nx , y : Int32\nend\nend" - formats "loop do\n 1\n loop do\n 2\n rescue\n 3\n end\n 4\nend" formats "loop do\n 1\n loop do\n 2\n rescue\n 3\n end\n 4\nend" - formats "module M\n @[MyAnn(\n 1\n\n )]\nend" formats "module M\n @[MyAnn(\n 1\n\n )]\nend" - formats "10 // a" formats "10 // a" - formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n); end" formats "def foo(\n @[MyAnn]\n @[MyAnn]\n bar,\n); end" - formats "1 || 2" formats "1 || 2" - formats "bar = foo(->do\n 1 + 2\nend)" formats "bar = foo(->do\n 1 + 2\nend)" - formats "1.== { 3 }" formats "1.== { 3 }" - formats "foo.bar &.baz( 1 , 2 )" formats "foo.bar &.baz( 1 , 2 )" - formats "lib Bar\n enum Foo\n A\n end\nend" formats "lib Bar\n enum Foo\n A\n end\nend" - formats "if 1\n foo(\n 1,\n 2 # lala\n )\nend\n" formats "if 1\n foo(\n 1,\n 2 # lala\n )\nend\n" - formats "Foo(\"bar\": Int32, \"baz qux\": Float64)" formats "Foo(\"bar\": Int32, \"baz qux\": Float64)" - formats "alias X = ((Y, Z) ->)" formats "alias X = ((Y, Z) ->)" - formats "asm(\"nop\" :::: \"volatile\" , \"alignstack\" , \"intel\" )" formats "asm(\"nop\" :::: \"volatile\" , \"alignstack\" , \"intel\" )" - formats "foo(->{\n 1 + 2\n})" formats "foo(->{\n 1 + 2\n})" - formats "def foo\nselect \n when foo \n 2 \n else \n 3 \nend\nend" formats "def foo\nselect \n when foo \n 2 \n else \n 3 \nend\nend" - formats "{} of A => B\n{} of Foo => Bar" formats "{} of A => B\n{} of Foo => Bar" - formats "foo &.bar.as?(T)" formats "foo &.bar.as?(T)" - formats "[\n # foo\n 1,\n\n # bar\n 2,\n]" formats "[\n # foo\n 1,\n\n # bar\n 2,\n]" - formats "macro foo()\n {% if 1 %} 2 {% end %}\nend" formats "macro foo()\n {% if 1 %} 2 {% end %}\nend" - formats "alias X = (A, B) ->\nbar : C" formats "alias X = (A, B) ->\nbar : C" - formats "foo.bar(&.baz)" formats "foo.bar(&.baz)" - formats "case 1 \n in Int32 \n 3 \n end" formats "case 1 \n in Int32 \n 3 \n end" - formats "Foo( Bar( ) )" formats "Foo( Bar( ) )" - formats "class Foo\n # ```\n # 1\n # ```\nend\n" formats "class Foo\n # ```\n # 1\n # ```\nend\n" - formats "module Foo; 1; end" formats "module Foo; 1; end" - formats "case 1\nwhen 2\n#comment\nend" formats "case 1\nwhen 2\n#comment\nend" -Code gen: asm - codegens without inputs codegens without inputs - codegens with two outputs codegens with two outputs - codegens with intel dialect codegens with intel dialect - codegens with two inputs codegens with two inputs - codegens with one input codegens with one input - passes correct string length to LLVM passes correct string length to LLVM -Semantic: recursive struct check - errors on recursive abstract struct through module (#11384) errors on recursive abstract struct through module (#11384) - detects recursive struct through module detects recursive struct through module - detects recursive struct through inheritance (#3071) detects recursive struct through inheritance (#3071) - errors on recursive struct through recursive alias (#4454) (#4455) errors on recursive struct through recursive alias (#4454) (#4455) - detects recursive generic struct through generic module (#4720) detects recursive generic struct through generic module (#4720) - errors on recursive generic struct inside module errors on recursive generic struct inside module - errors on recursive struct errors on recursive struct - errors on private recursive type errors on private recursive type - errors on recursive struct through named tuple errors on recursive struct through named tuple - detects recursive generic struct through module (#4720) detects recursive generic struct through module (#4720) - errors on mutually recursive struct errors on mutually recursive struct - errors on recursive struct inside module errors on recursive struct inside module - errors on recursive struct through tuple errors on recursive struct through tuple -Normalize: chained comparisons - normalizes two comparisons with calls normalizes two comparisons with calls - normalizes one comparison with var normalizes one comparison with var - normalizes one comparison with literal normalizes one comparison with literal - normalizes one comparison with call normalizes one comparison with call - normalizes two comparisons with literal normalizes two comparisons with literal -Semantic: metaclass - types generic instance metaclass superclass types generic instance metaclass superclass - types Object class types Object class - subtyping relations between metaclasses - non-generic modules non-generic modules - generic classes (3) generic classes (3) - generic modules (2) generic modules (2) - non-generic classes non-generic classes - generic classes (1) generic classes (1) - generic modules (1) generic modules (1) - generic modules (3) generic modules (3) - virtual metaclass type with virtual type (#12628) virtual metaclass type with virtual type (#12628) - generic classes (2) generic classes (2) - types Class class types Class class - types generic module metaclass types generic module metaclass - types Reference metaclass types Reference metaclass - types metaclass superclass types metaclass superclass - types Object and Class metaclasses types Object and Class metaclasses - can't reopen as module can't reopen as module - types generic metaclass superclass types generic metaclass superclass - types generic class metaclass types generic class metaclass - can't reopen as struct can't reopen as struct -Semantic: class - allows declaring a variable in an initialize and using it allows declaring a variable in an initialize and using it - can use short name for top-level type can use short name for top-level type - type def does not reopen type from parent namespace (#11181) type def does not reopen type from parent namespace (#11181) - types bug #168 (it inherits instance var even if not mentioned in initialize) types bug #168 (it inherits instance var even if not mentioned in initialize) - can invoke method on abstract generic type without subclasses nor instances can invoke method on abstract generic type without subclasses nor instances - errors if reopening generic class with different type vars errors if reopening generic class with different type vars - doesn't crash with top-level initialize (#2601) doesn't crash with top-level initialize (#2601) - types class and subclass as one type types class and subclass as one type - can invoke method on abstract generic type with subclasses but no instances can invoke method on abstract generic type with subclasses but no instances - says wrong number of arguments for abstract class new (2) says wrong number of arguments for abstract class new (2) - doesn't use initialize from base class doesn't use initialize from base class - reports can't instantiate abstract class on allocate reports can't instantiate abstract class on allocate - errors if using read-instance-var with non-typed variable errors if using read-instance-var with non-typed variable - says wrong number of arguments for abstract class new says wrong number of arguments for abstract class new - types as no return if calling method on abstract generic class (#6996) types as no return if calling method on abstract generic class (#6996) - inherits self twice (#5495) inherits self twice (#5495) - preserves order of instance vars (#3050) preserves order of instance vars (#3050) - doesn't mark instance variable as nilable if calling another initialize doesn't mark instance variable as nilable if calling another initialize - types instance variable types instance variable - reports unknown class when extending reports unknown class when extending - types virtual method of generic class types virtual method of generic class - types generic of generic type types generic of generic type - doesn't error on new on abstract virtual type class doesn't error on new on abstract virtual type class - doesn't lookup type in parents' namespaces, and lookups and in program doesn't lookup type in parents' namespaces, and lookups and in program - correctly types #680 correctly types #680 - errors if assigning superclass to declared instance var errors if assigning superclass to declared instance var - types self inside method call without obj types self inside method call without obj - does automatic type inference of new for generic types 2 does automatic type inference of new for generic types 2 - can't use implicit initialize if defined in parent can't use implicit initialize if defined in parent - errors if reopening generic class with different splat index errors if reopening generic class with different splat index - types class and subclass as one type types class and subclass as one type - can't reopen as module can't reopen as module - reads an object instance var reads an object instance var - errors if reading non-existent ivar errors if reading non-existent ivar - does automatic inference of new for generic types does automatic inference of new for generic types - errors if using underscore in generic class errors if using underscore in generic class - says that instance vars are not allowed in metaclass says that instance vars are not allowed in metaclass - reports undefined method when method inside a class reports undefined method when method inside a class - errors if reopening generic class with different splat index (3) errors if reopening generic class with different splat index (3) - doesn't mix classes on definition (#2352) doesn't mix classes on definition (#2352) - does automatic type inference of new for nested generic type does automatic type inference of new for nested generic type - errors if inherits from module errors if inherits from module - errors if inherits from metaclass errors if inherits from metaclass - types as no return if calling method on abstract class with all abstract subclasses (#6996) types as no return if calling method on abstract class with all abstract subclasses (#6996) - inherits self (#2890) inherits self (#2890) - types as no return if calling method on generic class with subclasses (#6996) types as no return if calling method on generic class with subclasses (#6996) - allows instantiating generic class with number allows instantiating generic class with number - reports undefined instance method reports undefined instance method - inherits Gen(self) (#2890) inherits Gen(self) (#2890) - errors if declares class inside if errors if declares class inside if - allows using self in class scope allows using self in class scope - doesn't lookup new in supermetaclass doesn't lookup new in supermetaclass - types instance variable on getter types instance variable on getter - types Const#allocate types Const#allocate - reads an object instance var from a union type reads an object instance var from a union type - allows defining classes inside modules or classes with :: allows defining classes inside modules or classes with :: - types class inside class types class inside class - types recursive type types recursive type - reads a virtual type instance var reads a virtual type instance var - uses number type var in class method uses number type var in class method - types Const#new types Const#new - types as no return if calling method on abstract class with generic subclasses but no instances (#6996) types as no return if calling method on abstract class with generic subclasses but no instances (#6996) - reports superclass mismatch reports superclass mismatch - hoists instance variable initializer hoists instance variable initializer - errors on no method found on abstract class, class method (#2241) errors on no method found on abstract class, class method (#2241) - reports can't instantiate abstract class on new reports can't instantiate abstract class on new - errors when creating Number errors when creating Number - doesn't use initialize from base class with virtual type doesn't use initialize from base class with virtual type - can mark initialize as private can mark initialize as private - doesn't crash on instance variable assigned a proc, and never instantiated (#923) doesn't crash on instance variable assigned a proc, and never instantiated (#923) - errors when wrong arguments for new errors when wrong arguments for new - says no overload matches for class new says no overload matches for class new - errors if reopening non-generic class as generic errors if reopening non-generic class as generic - errors when creating Value errors when creating Value - errors if reopening generic class with different type vars (2) errors if reopening generic class with different type vars (2) - errors if reopening generic class with different splat index (2) errors if reopening generic class with different splat index (2) - infers generic type after instance was created with explicit type infers generic type after instance was created with explicit type - uses self as type var uses self as type var - reports wrong number of arguments for initialize reports wrong number of arguments for initialize - uses self as type var uses self as type var - types type var union types type var union - errors if inheriting Gen(self) and there's no self (#2890) errors if inheriting Gen(self) and there's no self (#2890) - errors if creating instance before typing instance variable errors if creating instance before typing instance variable - can't reopen as struct can't reopen as struct - correctly types #680 (2) correctly types #680 (2) - finds in global scope if includes module finds in global scope if includes module - errors if reading ivar from non-ivar container errors if reading ivar from non-ivar container - can invoke method on abstract type without subclasses nor instances can invoke method on abstract type without subclasses nor instances - types class and subclass as one type types class and subclass as one type - reports uninitialized constant reports uninitialized constant - types Const#new#method types Const#new#method - types instance variable types instance variable -Crystal::Repl::Interpreter - extern - discards primitive struct_or_union_set and get (struct) discards primitive struct_or_union_set and get (struct) - does automatic C cast does automatic C cast - discards primitive struct_or_union_set because it's a copy discards primitive struct_or_union_set because it's a copy - sets extern struct proc field sets extern struct proc field - sets struct field through pointer sets struct field through pointer - interprets primitive struct_or_union_set and get (union) interprets primitive struct_or_union_set and get (union) - interprets primitive struct_or_union_set and get (struct) interprets primitive struct_or_union_set and get (struct) -Codegen: class var - codegens class var inside instance method codegens class var inside instance method - initializes class var with array literal initializes class var with array literal initializes class var with array literal initializes class var with array literal initializes class var with array literal initializes class var with array literal initializes class var with array literal initializes class var with array literal initializes class var with array literal initializes class var with array literal - reads class var before initializing it (hoisting) reads class var before initializing it (hoisting) - inline initialization of simple class var inline initialization of simple class var - doesn't crash with pointerof from another module doesn't crash with pointerof from another module doesn't crash with pointerof from another module doesn't crash with pointerof from another module doesn't crash with pointerof from another module doesn't crash with pointerof from another module doesn't crash with pointerof from another module doesn't crash with pointerof from another module doesn't crash with pointerof from another module doesn't crash with pointerof from another module - accesses class var from proc literal accesses class var from proc literal - codegens second class var initializer codegens second class var initializer - codegens class var inside module codegens class var inside module - declares and initializes declares and initializes - codegens class var as nil if assigned for the first time inside method codegens class var as nil if assigned for the first time inside method - reads class var from virtual type metaclass reads class var from virtual type metaclass - uses var in class var initializer uses var in class var initializer - initializes class var the moment it reaches it initializes class var the moment it reaches it initializes class var the moment it reaches it initializes class var the moment it reaches it initializes class var the moment it reaches it initializes class var the moment it reaches it initializes class var the moment it reaches it initializes class var the moment it reaches it initializes class var the moment it reaches it initializes class var the moment it reaches it - codegens class var with nilable reference type codegens class var with nilable reference type - codegens class var with type declaration begin and vars codegens class var with type declaration begin and vars - codegens class var with begin and vars codegens class var with begin and vars - runs class var side effects (#8862) runs class var side effects (#8862) runs class var side effects (#8862) runs class var side effects (#8862) runs class var side effects (#8862) runs class var side effects (#8862) runs class var side effects (#8862) runs class var side effects (#8862) runs class var side effects (#8862) runs class var side effects (#8862) - catch infinite loop in class var initializer catch infinite loop in class var initializer catch infinite loop in class var initializer catch infinite loop in class var initializer catch infinite loop in class var initializer catch infinite loop in class var initializer catch infinite loop in class var initializer catch infinite loop in class var initializer catch infinite loop in class var initializer catch infinite loop in class var initializer - writes class var from virtual type writes class var from virtual type - codegens class var codegens class var - codegens generic class with class var codegens generic class with class var - gets pointerof class var gets pointerof class var - codegens class var as nil codegens class var as nil - doesn't use nilable type for initializer doesn't use nilable type for initializer - doesn't inherit class var value in subclass doesn't inherit class var value in subclass - reads class var from virtual type reads class var from virtual type - reads simple class var before another complex one reads simple class var before another complex one - initializes class var of union with single type initializes class var of union with single type - gets pointerof class var complex constant gets pointerof class var complex constant - initializes dependent constant before class var initializes dependent constant before class var initializes dependent constant before class var initializes dependent constant before class var initializes dependent constant before class var initializes dependent constant before class var initializes dependent constant before class var initializes dependent constant before class var initializes dependent constant before class var initializes dependent constant before class var - declares var as uninitialized and initializes it unsafely declares var as uninitialized and initializes it unsafely - doesn't inherit class var value in module doesn't inherit class var value in module - doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) doesn't error if class var shares name with const (#7865) -Codegen: while - doesn't crash on #2767 doesn't crash on #2767 - codegens while with non-false condition codegens while with non-false condition - endless break with value endless break with value - codegens def with while codegens def with while - break without value break without value - codegens while with false codegens while with false - codegens while with declared var 1 codegens while with declared var 1 - codegens while with declared var 3 codegens while with declared var 3 - doesn't crash on #2767 (3) doesn't crash on #2767 (3) - doesn't crash on a = NoReturn doesn't crash on a = NoReturn - conditional break with value conditional break with value - skip block with next skip block with next - doesn't crash on #2767 (2) doesn't crash on #2767 (2) - codegens while with declared var 2 codegens while with declared var 2 - conditional break without value conditional break without value - doesn't crash on while true begin break rescue (#7786) doesn't crash on while true begin break rescue (#7786) - codegens endless while codegens endless while - endless conditional break with value endless conditional break with value - doesn't crash on #2767 (4) doesn't crash on #2767 (4) - break with value, condition fails break with value, condition fails - break with value break with value -Crystal::Repl::Interpreter - closures - passes closured struct instance var as self passes closured struct instance var as self - does closure inside block does closure inside block - does closure inside block, capture block arg does closure inside block, capture block arg - reads self closured struct (#12341) reads self closured struct (#12341) - does closure inside def does closure inside def - closures struct and calls method on it closures struct and calls method on it - does closure with two args that captures and modifies two local variables does closure with two args that captures and modifies two local variables - does closure inside proc, capture proc argument does closure inside proc, capture proc argument - closures self and modifies instance var closures self and modifies instance var - does closure without args that captures and modifies two local variables does closure without args that captures and modifies two local variables - does closure inside const does closure inside const - does closure with pointerof local var does closure with pointerof local var - does nested closure inside captured blocks does nested closure inside captured blocks - doesn't mix local vars with closured vars doesn't mix local vars with closured vars - closures self in proc literal closures self in proc literal - does closure and accesses it inside block does closure and accesses it inside block - closures closured block arg closures closured block arg - sets ivar of self closured struct (#12341) sets ivar of self closured struct (#12341) - does next inside captured block (#12226) does next inside captured block (#12226) - closures def arguments closures def arguments - does closure inside class variable initializer does closure inside class variable initializer - does closure without args that captures and modifies one local variable does closure without args that captures and modifies one local variable - does nested closure inside methods and blocks does nested closure inside methods and blocks - closures block args after 8 bytes (the closure var) closures block args after 8 bytes (the closure var) - gets ivar of self closured struct (#12341) gets ivar of self closured struct (#12341) - does closure inside proc does closure inside proc - does nested closure inside proc does nested closure inside proc - closures self in proc literal (implicit self) closures self in proc literal (implicit self) -Normalize: hash literal - normalizes non-empty without of normalizes non-empty without of - hoists complex element expressions, hash-like generic hoists complex element expressions, hash-like generic - evaluates key and value expressions in correct order evaluates key and value expressions in correct order - hoists complex element expressions, hash-like hoists complex element expressions, hash-like - normalizes non-empty with of normalizes non-empty with of - hoists complex element expressions hoists complex element expressions - normalizes empty with of normalizes empty with of -Code gen: hooks - does extended macro does extended macro - does inherited macro recursively does inherited macro recursively - does finished does finished - fixes empty types in hooks (#3946) fixes empty types in hooks (#3946) - does included macro does included macro - does inherited macro before class body does inherited macro before class body does inherited macro before class body does inherited macro before class body does inherited macro before class body does inherited macro before class body does inherited macro before class body does inherited macro before class body does inherited macro before class body does inherited macro before class body - does added method macro does added method macro - does inherited macro does inherited macro -unreachable - ignores autogenerated enum predicates ignores autogenerated enum predicates - finds methods called from reachable code finds methods called from reachable code - finds method called from expanded macro expression finds method called from expanded macro expression - finds method with `super` finds method with `super` - finds method with free variable finds method with free variable - finds method called from expanded macro finds method called from expanded macro - finds instance methods finds instance methods - finds instance methods in nested types finds instance methods in nested types - tallies calls tallies calls - finds shadowed method finds shadowed method - finds method with `previous_def` finds method with `previous_def` - handles circular hierarchy references (#14034) handles circular hierarchy references (#14034) - finds yielding methods finds yielding methods - finds class methods finds class methods - finds methods with proc parameter finds methods with proc parameter - finds virtual method finds virtual method - finds methods in generic type finds methods in generic type - finds method in abstract type finds method in abstract type - finds method called from proc finds method called from proc - finds initializer finds initializer - finds method called from instance variable initializer finds method called from instance variable initializer - finds top level methods finds top level methods - finds method called from block finds method called from block - finds abstract method finds abstract method -Semantic: cast - disallows casting to Class disallows casting to Class - doesn't allow upcast of generic type var (#996) doesn't allow upcast of generic type var (#996) - allows casting reference union to void pointer allows casting reference union to void pointer - casts pointer of one type to another type casts pointer of one type to another type - casts pointer to another type casts pointer to another type - casts from pointer to generic class gives error casts from pointer to generic class gives error - casts to bigger union casts to bigger union - disallows casting int to pointer disallows casting int to pointer - disallows casting to Object (#815) disallows casting to Object (#815) - casts to same type is ok casts to same type is ok - casts to target type even if can't infer casted value type (obsolete) casts to target type even if can't infer casted value type (obsolete) - doesn't cast to virtual primitive (bug) doesn't cast to virtual primitive (bug) - considers else to be unreachable (#9658) considers else to be unreachable (#9658) - doesn't cast to unbound generic type (as?) (#5927) doesn't cast to unbound generic type (as?) (#5927) - doesn't error if casting to a generic type doesn't error if casting to a generic type - disallows casting pointer to fun disallows casting pointer to fun - casts to incompatible type gives error casts to incompatible type gives error - casts to compatible type and use it casts to compatible type and use it - casts uninstantiated generic class to itself (#10882) casts uninstantiated generic class to itself (#10882) - doesn't cast to unbound generic type (as) (#5927) doesn't cast to unbound generic type (as) (#5927) - casts to generic virtual type casts to generic virtual type - allows casting object to void pointer allows casting object to void pointer - errors if casting nil to Object inside typeof (#2403) errors if casting nil to Object inside typeof (#2403) - doesn't crash with typeof no-type (#7441) doesn't crash with typeof no-type (#7441) - doesn't eagerly try to check cast type (#12268) doesn't eagerly try to check cast type (#12268) - casts from union to compatible union casts from union to compatible union - can cast to metaclass (bug) can cast to metaclass (bug) - should error if can't cast even if not instantiated should error if can't cast even if not instantiated - errors on cast inside a call that can't be instantiated errors on cast inside a call that can't be instantiated - allows casting NoReturn to any type (#2132) allows casting NoReturn to any type (#2132) - can cast to metaclass (2) (#11121) can cast to metaclass (2) (#11121) - disallows casting fun to pointer disallows casting fun to pointer - casts to module casts to module - casts from union to incompatible union gives error casts from union to incompatible union gives error - casts to base class making it virtual (2) casts to base class making it virtual (2) - disallows casting to Reference disallows casting to Reference - casts to base class making it virtual (1) casts to base class making it virtual (1) - can cast from Void* to virtual type (#3014) can cast from Void* to virtual type (#3014) -Code gen: nilable cast - does nilable cast (true) does nilable cast (true) - upcasts type to virtual (2) (#3304) upcasts type to virtual (2) (#3304) - casts union type to nilable type (#9342) casts union type to nilable type (#9342) - does nilable cast (always true) does nilable cast (always true) - codegens with NoReturn codegens with NoReturn - upcasts type to virtual (#3304) upcasts type to virtual (#3304) - does nilable cast (false) does nilable cast (false) - does cast to nil (2) does cast to nil (2) - does upcast does upcast - does cast to nil (1) does cast to nil (1) - types as? with wrong type (#2775) types as? with wrong type (#2775) - casts with block var that changes type (#3341) casts with block var that changes type (#3341) -Code gen: struct - builds struct setter with fun type (1) builds struct setter with fun type (1) - passes struct to method (1) passes struct to method (1) - codegens assign struct to union codegens assign struct to union - does to_s does to_s does to_s does to_s does to_s does to_s does to_s does to_s does to_s does to_s - codegens passing pointerof(struct) to fun codegens passing pointerof(struct) to fun - codegens struct property default value codegens struct property default value - allows using named arguments for new allows using named arguments for new - builds struct setter with fun type (2) builds struct setter with fun type (2) - codegens struct access with -> and then . codegens struct access with -> and then . - automatically converts nil to pointer automatically converts nil to pointer - can access member of uninitialized struct behind type (#8774) can access member of uninitialized struct behind type (#8774) - automatically converts numeric type in struct field assignment automatically converts numeric type in struct field assignment - can access instance var from the outside (#1092) can access instance var from the outside (#1092) - codegens set struct value with constant codegens set struct value with constant - codegens struct property setter codegens struct property setter - automatically converts by invoking to_unsafe automatically converts by invoking to_unsafe - passes struct to method (2) passes struct to method (2) - codegens struct property setter via pointer codegens struct property setter via pointer - codegens struct set inside struct codegens struct set inside struct - automatically converts numeric union type in struct field assignment automatically converts numeric union type in struct field assignment - codegens struct property setter via pointer codegens struct property setter via pointer - codegens union inside struct codegens union inside struct - codegens pointer malloc of struct codegens pointer malloc of struct - yields struct via -> yields struct via -> - codegens struct get inside struct codegens struct get inside struct - sets instance var to proc sets instance var to proc sets instance var to proc sets instance var to proc sets instance var to proc sets instance var to proc sets instance var to proc sets instance var to proc sets instance var to proc sets instance var to proc -Semantic: offsetof - types offsetof types offsetof - gives error if using offsetof on Tuples with indexes greater than tuple size gives error if using offsetof on Tuples with indexes greater than tuple size - gives error if using offsetof on Tuples with instance variables gives error if using offsetof on Tuples with instance variables - errors on offsetof element of uninstantiated generic type errors on offsetof element of uninstantiated generic type - gives error if using offsetof on non-Tuples with an index gives error if using offsetof on non-Tuples with an index - can be used with generic types can be used with generic types - can be used with classes can be used with classes - errors on typeof inside offsetof expression errors on typeof inside offsetof expression - gives error if using offsetof on something that's neither a class, a struct nor a Tuple gives error if using offsetof on something that's neither a class, a struct nor a Tuple - gives error if using offsetof on Tuples with negative indexes gives error if using offsetof on Tuples with negative indexes - gives error if using offsetof on something that can't have instance variables gives error if using offsetof on something that can't have instance variables - errors on undefined instance variable errors on undefined instance variable -Crystal::Repl::Interpreter - calls - does call with struct as obj (2) does call with struct as obj (2) - does call on instance var that's a struct, from a class does call on instance var that's a struct, from a class - inlines call that returns self inlines call that returns self - interprets explicit self call for primitive types interprets explicit self call for primitive types - does call on instance var that's a struct, from a struct does call on instance var that's a struct, from a struct - calls a top-level method without arguments but with local vars calls a top-level method without arguments but with local vars - interprets call with named arguments interprets call with named arguments - calls a top-level method without arguments and no local vars calls a top-level method without arguments and no local vars - does Assign instance var with wants_struct_pointer does Assign instance var with wants_struct_pointer - does call with struct as obj does call with struct as obj - inlines method that just reads an instance var (2) inlines method that just reads an instance var (2) - does call on var that's a struct, takes a pointer to instance var, inside if does call on var that's a struct, takes a pointer to instance var, inside if - interprets implicit self call for pointer interprets implicit self call for pointer - does ReadInstanceVar with wants_struct_pointer does ReadInstanceVar with wants_struct_pointer - calls a top-level method with two arguments calls a top-level method with two arguments - interprets call with default values interprets call with default values - does call on ivar that's a struct, takes a pointer to instance var, inside if does call on ivar that's a struct, takes a pointer to instance var, inside if - mutates through pointer (1) mutates through pointer (1) - does Assign var with wants_struct_pointer does Assign var with wants_struct_pointer - mutates call argument mutates call argument - mutates through inlined instance var without receiver mutates through inlined instance var without receiver - does Assign class var with wants_struct_pointer does Assign class var with wants_struct_pointer - puts struct pointer after tuple indexer puts struct pointer after tuple indexer - mutates through pointer (3) mutates through pointer (3) - does call on read instance var that's a struct, takes a pointer to instance var does call on read instance var that's a struct, takes a pointer to instance var - discards call with struct as obj discards call with struct as obj - inlines method that just reads an instance var, but produces side effects of args inlines method that just reads an instance var, but produces side effects of args - inlines call that returns self (2) inlines call that returns self (2) - mutates through read instance var mutates through read instance var - mutates through pointer (2) mutates through pointer (2) - mutates through inlined instance var with receiver mutates through inlined instance var with receiver - does call on Pointer#value that's a struct, takes a pointer to instance var does call on Pointer#value that's a struct, takes a pointer to instance var - does call on constant that's a struct, takes a pointer to instance var, inside if does call on constant that's a struct, takes a pointer to instance var, inside if - interprets call with if interprets call with if - does call on constant that's a struct, takes a pointer to instance var does call on constant that's a struct, takes a pointer to instance var - does call on self that's a struct, takes a pointer to instance var, inside if does call on self that's a struct, takes a pointer to instance var, inside if - interprets self for primitive types interprets self for primitive types - inlines method that just reads an instance var inlines method that just reads an instance var -Semantic: did you mean - says did you mean for instance var in subclass says did you mean for instance var in subclass - suggests for class variable suggests for class variable - says did you mean for named argument says did you mean for named argument - says did you mean finds most similar in def says did you mean finds most similar in def - says did you mean for two mistakes in long word in instance method says did you mean for two mistakes in long word in instance method - suggests a better alternative to logical operators (#2715) suggests a better alternative to logical operators (#2715) - doesn't suggest when declaring var inside macro (#466) doesn't suggest when declaring var inside macro (#466) - says did you mean for global method without parenthesis says did you mean for global method without parenthesis - says did you mean in instance var declaration says did you mean in instance var declaration - says did you mean for variable says did you mean for variable - suggest that there might be a typo for an initialize method suggest that there might be a typo for an initialize method - says did you mean for class says did you mean for class - says did you mean finds most similar in type says did you mean finds most similar in type - suggest that there might be a typo for an initialize method in inherited class suggest that there might be a typo for an initialize method in inherited class - doesn't suggest when declaring var with suffix if and using it (#946) doesn't suggest when declaring var with suffix if and using it (#946) - doesn't suggest for operator doesn't suggest for operator - suggest that there might be a typo for an initialize method with overload suggest that there might be a typo for an initialize method with overload - says did you mean for global method with parenthesis says did you mean for global method with parenthesis - says did you mean for nested class via alias says did you mean for nested class via alias - says did you mean for nested class says did you mean for nested class - says did you mean for instance var says did you mean for instance var - says did you mean for one mistake in short word in instance method says did you mean for one mistake in short word in instance method -Semantic: struct - errors if includes and field already exists, the other way around errors if includes and field already exists, the other way around - errors if already defined with another type errors if already defined with another type - errors if includes unknown type errors if includes unknown type - supports macro if inside struct supports macro if inside struct - errors if already defined with another type (2) errors if already defined with another type (2) - errors if invoking to_i32! and got wrong type errors if invoking to_i32! and got wrong type - errors if using void via typedef in struct field type errors if using void via typedef in struct field type - marks as packed marks as packed - types struct getter on pointer type types struct getter on pointer type - types struct types struct - errors on struct if no field errors on struct if no field - errors if includes and field already exists errors if includes and field already exists - errors if using void in struct field type errors if using void in struct field type - errors if invoking to_unsafe and got error in that call errors if invoking to_unsafe and got error in that call - errors if invoking to_unsafe and got different type errors if invoking to_unsafe and got different type - errors if setting closure errors if setting closure - types struct getter multiple levels via new types struct getter multiple levels via new - types Struct#new types Struct#new - errors on struct setter if different type via new errors on struct setter if different type via new - allows inline forward declaration allows inline forward declaration - automatically converts numeric type in struct field assignment automatically converts numeric type in struct field assignment - errors if invoking to_i32! and got error in that call errors if invoking to_i32! and got error in that call - errors on struct setter if different type errors on struct setter if different type - includes another struct includes another struct - types struct setter types struct setter - types struct getter to struct types struct getter to struct - errors if includes non-cstruct type errors if includes non-cstruct type - types struct getter types struct getter - errors if already defined errors if already defined - errors on empty c struct (#633) errors on empty c struct (#633) - types struct getter with keyword name types struct getter with keyword name - can access instance var from the outside (#1092) can access instance var from the outside (#1092) -Crystal::Doc::MarkdDocRenderer - renders code spans - renders "`