diff options
author | Eduardo Julian | 2019-09-18 22:10:08 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-09-18 22:10:08 -0400 |
commit | 6ac46f2f385815f6b51bef9c81435d283c598459 (patch) | |
tree | 1b4336f3a90bdef1b2ed90d3087deb50093d7424 /new-luxc/source/luxc/lang/packager.lux | |
parent | 343c16f6f960eb1e7c75804ee83d4d8dba8a11e7 (diff) |
Now generating a "LuxProgram" class, instead of a "_" class.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/packager.lux | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/new-luxc/source/luxc/lang/packager.lux b/new-luxc/source/luxc/lang/packager.lux index 3f8cb36cb..f18055b18 100644 --- a/new-luxc/source/luxc/lang/packager.lux +++ b/new-luxc/source/luxc/lang/packager.lux @@ -12,7 +12,7 @@ [target [jvm [encoding - ["." name]]]] + ["." name (#+ External)]]]] [tool [compiler [phase @@ -71,16 +71,14 @@ (def: manifest-version "1.0") (def: class-name - (-> Module Text) + (-> Text Text) (text.suffix ".class")) -(def: main "_") - -(def: (manifest module) - (-> Module java/util/jar/Manifest) +(def: (manifest program-class) + (-> External java/util/jar/Manifest) (let [manifest (java/util/jar/Manifest::new)] (exec (do-to (java/util/jar/Manifest::getMainAttributes manifest) - (java/util/jar/Attributes::put (java/util/jar/Attributes$Name::MAIN_CLASS) ..main) + (java/util/jar/Attributes::put (java/util/jar/Attributes$Name::MAIN_CLASS) program-class) (java/util/jar/Attributes::put (java/util/jar/Attributes$Name::MANIFEST_VERSION) ..manifest-version)) manifest))) @@ -99,10 +97,10 @@ row.to-list (list@fold ..write-class sink))) -(def: #export (package module outputs) - (-> Module (Output Definition) Binary) +(def: #export (package program-class outputs) + (-> External (Output Definition) Binary) (let [buffer (java/io/ByteArrayOutputStream::new (.int mega-byte)) - sink (java/util/jar/JarOutputStream::new buffer (manifest module))] + sink (java/util/jar/JarOutputStream::new buffer (manifest program-class))] (exec (|> outputs row.to-list (list@fold ..write-module sink)) |