2014-01-05 18:32:47 +00:00
|
|
|
(*
|
2013-11-16 05:26:16 +00:00
|
|
|
-- This example ask uses the parses to process a Lean string that
|
|
|
|
-- contains a nested script block. The nexted script block will
|
|
|
|
-- invoke the leanlua_state recursively. It also demonstrates that we
|
|
|
|
-- need to use std::recursive_mutex instead of std::mutex at
|
|
|
|
-- leanlua_state. Otherwise, it will deadlock trying to get a lock on
|
|
|
|
-- the mutex.
|
2014-01-05 18:32:47 +00:00
|
|
|
code = "(" .. "*" .. "print('hello')" .. "*" .. ")"
|
2013-11-16 05:26:16 +00:00
|
|
|
print("executing: " .. code)
|
|
|
|
parse_lean_cmds(code)
|
2014-01-05 18:32:47 +00:00
|
|
|
*)
|