diff options
author | Eduardo Julian | 2021-01-12 17:31:48 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-01-12 17:31:48 -0400 |
commit | 5dbf134346424602b0104d1f749c1a9eac6f21af (patch) | |
tree | ac77441b9fcbc66a6f9ef1e5a55ccf0b1bcc996e /lux-js/source | |
parent | 8aac0c573c29d2829242d66539a9e027d03ff8ec (diff) |
Compiler now shows suggestions when encountering unknown definitions.
Diffstat (limited to 'lux-js/source')
-rw-r--r-- | lux-js/source/program.lux | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux index c923aace5..48392d358 100644 --- a/lux-js/source/program.lux +++ b/lux-js/source/program.lux @@ -562,8 +562,8 @@ #platform.runtime runtime.generate #platform.write (|>> _.code (\ encoding.utf8 encode))}))) -(def: (program namer context program) - (-> (-> Context Text) (Program _.Expression _.Statement)) +(def: (program context program) + (-> (Program _.Expression _.Statement)) (let [@process (_.var "process") on_node_js? (|> (|> @process _.type_of (_.= (_.string "undefined")) _.not) (_.and (|> @process (_.the "argv")))) @@ -619,21 +619,25 @@ (list)))) (program: [{service /cli.service}] - (exec (do promise.monad - [_ (/.compiler {#/static.host @.js - #/static.host_module_extension ".js" - #/static.target (/cli.target service) - #/static.artifact_extension ".js"} - ..expander - analysis.bundle - ..platform - generation.bundle - extension/bundle.empty - (..program reference.artifact) - [(& Register Text) _.Expression _.Statement] - ..extender - service - [(packager.package _.use_strict _.code _.then ..scope) - (format (/cli.target service) (\ file.default separator) "program.js")])] - (..declare_success! [])) - (io.io []))) + (let [extension ".js"] + (exec (do promise.monad + [_ (/.compiler {#/static.host @.js + #/static.host_module_extension extension + #/static.target (/cli.target service) + #/static.artifact_extension extension} + ..expander + analysis.bundle + ..platform + generation.bundle + extension/bundle.empty + ..program + [(& Register Text) _.Expression _.Statement] + ..extender + service + [(packager.package _.use_strict _.code _.then ..scope) + (format (/cli.target service) + (\ file.default separator) + "program" + extension)])] + (..declare_success! [])) + (io.io [])))) |