Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
38481431
Commit
38481431
authored
Apr 03, 2013
by
Moses Nakamura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed whitespace error, tried to clean up names
parent
0411f046
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
Main.hs
compiler/src/Main.hs
+6
-7
No files found.
compiler/src/Main.hs
View file @
38481431
...
...
@@ -40,23 +40,22 @@ main = do
let
lang
=
head
args
putStrLn
lang
let
files
=
tail
args
handleFiles
(
generat
eCode
lang
)
files
handleFiles
(
generat
orFnFor
lang
)
files
handleFiles
codeGenerator
files
=
case
codeGenerator
of
Right
fn
->
mapM_
(
handleFile
fn
)
files
Left
str
->
putStrLn
str
handleFiles
(
Right
fn
)
files
=
mapM_
(
handleFile
fn
)
files
handleFiles
(
Left
str
)
_
=
putStrLn
str
handleFile
codeGenerator
filename
=
do
handleFile
generateCode
filename
=
do
text
<-
readFile
filename
case
parseAndCompileFile
filename
text
of
Active
desc
[]
->
do
print
desc
codeGenerator
desc
filename
generateCode
desc
filename
Active
_
e
->
mapM_
printError
(
List
.
sortBy
compareErrors
e
)
Failed
e
->
mapM_
printError
(
List
.
sortBy
compareErrors
e
)
generat
eCode
lang
=
case
lang
of
generat
orFnFor
lang
=
case
lang
of
"c++"
->
Right
(
\
desc
filename
->
do
header
<-
generateCxxHeader
desc
LZ
.
writeFile
(
filename
++
".h"
)
header
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment