This website requires JavaScript.
Explore
Help
Sign in
michael
/
lean2
Watch
1
Star
0
Fork
You've already forked lean2
0
Code
Issues
Pull requests
Projects
Releases
Packages
Wiki
Activity
Actions
3abfad7a88
lean2
/
tests
/
lean
/
lua1.lean
8 lines
74 B
Text
Raw
Normal View
History
Unescape
Escape
feat(frontends/lean): add support for embedded Lua scripts in Lean files Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-07 21:56:04 +00:00
Variable x : Int
feat(lua): use (** ... **) instead of {{ ... }} for nested Lua scripts The token }} is a bad delimiter for blocks of Lua script code nested in Lean files. The problem is that the sequence }} occurs very often in Lua code because Lua uses { and } to build tables/lists/arrays. Here is an example of Lua code that contains the sequence }} t = {{1, 2}, {2, 3}, {3, 4}} In Lean, (* ... *) is used to create comments. Thus, (** ... **) code blocks will not affect valid Lean files. It also looks reasonably good. Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-13 00:05:46 +00:00
(**
feat(frontends/lean): add support for embedded Lua scripts in Lean files Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-07 21:56:04 +00:00
print("hello world from Lua")
feat(lua): use (** ... **) instead of {{ ... }} for nested Lua scripts The token }} is a bad delimiter for blocks of Lua script code nested in Lean files. The problem is that the sequence }} occurs very often in Lua code because Lua uses { and } to build tables/lists/arrays. Here is an example of Lua code that contains the sequence }} t = {{1, 2}, {2, 3}, {3, 4}} In Lean, (* ... *) is used to create comments. Thus, (** ... **) code blocks will not affect valid Lean files. It also looks reasonably good. Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-13 00:05:46 +00:00
**)
feat(frontends/lean): add support for embedded Lua scripts in Lean files Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-07 21:56:04 +00:00
Variable y : Int
Reference in a new issue
Copy permalink