Logo
Explore Mail Help
Register Sign In
Mirror/wren
1
0
Fork 1
You've already forked wren
mirror of https://github.com/wren-lang/wren.git synced 2026-01-13 07:08:43 +01:00
Code Issues Packages Projects Releases Wiki Activity
Files
explicit-self-send
wren/test/language/module_variable/use_in_function.wren

6 lines
81 B
Plaintext
Raw Permalink Normal View History

Remove support for implicit self sends and convert everything to '@'. This fixes the nasty case where "foo(bar)" is context-sensitive, and generally simplifies the compiler a lot since there is a clear distinction between lexical and dynamic scope. Also: - Remove the special handling of capitalized names since all names are lexical now. - Allow methods to close over local variables in enclosing functions. - Allow implicit definition of all lexical names.
2015-11-30 22:46:11 -08:00
var variable = "module"
Fn.new {
System.print(variable) // expect: module
Allow infix () and {} to call "call" on the left-hand side. - Allow this for both argument lists and block arguments. - Tweak precedence to make "." higher than infix "{}" to avoid a class body being parsed as the superclass clause's block argument. - Convert all uses of ".call" to use this. (There was not a single case in the repo that ran into the getter ambiguity.)
2015-12-01 07:49:04 -08:00
}()
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.0 Page: 1205ms Template: 32ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API