Commit graph

128 commits

Author SHA1 Message Date
Max New
6b255fed59 Fix multiline string handling and add more tests. 2014-01-07 17:01:29 -06:00
Max New
5ea3ec7f80 Call out to stringLiteral/charLiteral for string/char literal parsing 2014-01-07 15:44:12 -06:00
Evan Czaplicki
c966776788 Add -W flag to many files, mostly getting rid of dead imports 2014-01-04 10:54:46 +01:00
Evan Czaplicki
6a8db4c230 Get rid of dead dependencies and add -Wall for some files 2014-01-03 12:33:56 +01:00
Evan Czaplicki
bdeb36eb6f Fix port parser! Copy paste error on the operator. 2014-01-03 12:12:43 +01:00
Evan Czaplicki
98f7be328b Make "combineAnnotations" a part of parsing a program 2014-01-02 23:42:54 -08:00
Evan Czaplicki
e3b8ea7d09 Update basic parsers to use the new formats for Expr, Declaration, and Port 2014-01-02 23:20:25 -08:00
Evan Czaplicki
740702c0d7 Begin switch from current FFI syntax to "port" syntax 2013-12-23 23:53:54 -08:00
Evan Czaplicki
fcbd7fd73b Improve some parser code by adding type annotations, removing unused dependencies, and using prefixed imports 2013-12-23 23:26:03 -08:00
Evan Czaplicki
0486c90bd3 Merge branch 'dev' into deriving 2013-12-23 17:03:05 -08:00
Evan Czaplicki
83e8bad84f Add basics of "deriving" for ADTs and type aliases. Only parse it for type aliases at the moment. 2013-12-23 16:51:15 -08:00
Max New
254d71f4e5 Expand else to True instead of otherwise.
Makes `if` syntax independent of the value of `otherwise`.
Includes test case.
2013-12-23 18:31:55 -06:00
Evan Czaplicki
32c78efe7d Begin process of allowing "deriving" on type aliases. 2013-12-23 14:42:43 -08:00
Evan Czaplicki
e119d8ef62 Get rid of SourceSyntax.Everything module 2013-12-22 15:18:16 -08:00
Evan Czaplicki
f8bf89b48d Make sure that all names in a program are safe for use in JS code 2013-12-22 15:00:29 -08:00
Evan Czaplicki
e690c427b7 Add deriving as a reserved word 2013-12-21 23:55:33 -08:00
Timothy Vladimír Hobbs
cbbd42d3f3 Fix bug in parser
34913d5 broke the parser in the following case:

f = '\"'

This commit fixes that.
2013-12-21 23:21:10 +01:00
Evan Czaplicki
34913d5340 Fix issue #397. Core issue was that scanning for infix declarations was not clever about strings. 2013-12-19 10:41:31 -08:00
Evan Czaplicki
6768b0ef7a Get rid of dependency on Text.Read.readMaybe to resolve #382 2013-12-11 18:57:56 -08:00
Evan Czaplicki
4452e4e138 Turn off markdown interpolation for now.
This will of course get turned back on! I don’t want to do it in the
very next release though.
2013-12-10 23:04:27 -08:00
Evan Czaplicki
e32eab0e62 Merge branch 'master' into dev
Conflicts:
	compiler/Generate/JavaScript.hs
	compiler/Generate/Noscript.hs
	compiler/Parse/Expression.hs
	compiler/SourceSyntax/Expression.hs
2013-11-22 12:22:29 -08:00
Evan Czaplicki
c8643484be Abstract out the code for markdown parsing, making it easier to switch out the implementation 2013-11-22 12:12:22 -08:00
Evan Czaplicki
07187bd811 Better error when bad backslashing is used in strings 2013-11-11 15:40:51 +01:00
Evan Czaplicki
90e007730d introduce the padded function to use fewer whitespace markers 2013-11-02 19:21:26 +01:00
Evan Czaplicki
56ecbbc70a Implement markdown interpolation 2013-10-25 17:36:30 +02:00
Evan Czaplicki
c685c8b91b cosmetic changes on fix for #305
I felt weird about the previous style where things were more
intermingled. Does everything still look okay?
2013-10-19 22:14:34 -04:00
John P Mayer Jr
e75f5388fb can have zero fields if no extension could be parsed 2013-10-20 01:28:52 +00:00
Evan Czaplicki
5ad0ec5b7a Parse documentation and infix declarations more safely 2013-10-17 13:40:28 -04:00
Evan Czaplicki
03cf56d8ec cosmetic: make it simpler to get locations for parses 2013-10-14 22:38:38 -04:00
Evan Czaplicki
11a60de544 Disallow extended record types with no fields, resolves #280 2013-10-14 17:42:26 -04:00
Evan Czaplicki
115b139774 fix #279 2013-10-14 16:59:37 -04:00
Evan Czaplicki
958fb1c896 Treat strings like any other pattern literal 2013-10-02 16:55:46 -07:00
Evan Czaplicki
c2eecc2084 Properly parse all user-defined infix declarations 2013-09-15 14:39:56 -07:00
Evan Czaplicki
11f5f5263c Actually use infixes in parser 2013-09-15 14:39:55 -07:00
Evan Czaplicki
fb64557f75 Switch format of OpTables, and add iParse that takes a table 2013-09-15 14:39:55 -07:00
Evan Czaplicki
a7bb2b7ac3 Fix issue in which type expressions eat trailing whitespace. 2013-09-06 12:22:01 -07:00
Evan Czaplicki
eb2a032e54 Remove unused import 2013-09-05 16:55:24 -07:00
Evan Czaplicki
8a913451c7 Add more helper functions
Ensure that comment parsers return the full body.
Add functions for skipping over characters.
Add function to extract the corresponding source text of a parse.
2013-09-04 17:17:48 -07:00
Evan Czaplicki
fecc96dde7 Rename some functions and export typeAnnotation 2013-09-04 17:16:35 -07:00
Evan Czaplicki
24642c85e6 Change default associativity to left 2013-09-04 17:16:07 -07:00
Evan Czaplicki
16a215a249 Show sign on interpolation if there is a failure 2013-09-02 15:18:20 -07:00
Evan Czaplicki
aed6d9547a Merge branch 'experimental' into dev
Conflicts:
	compiler/Generate/JavaScript.hs
2013-09-01 01:43:51 -07:00
Evan Czaplicki
3a072982ac Get generation working
move `makeSafe` over and make floats work
2013-08-31 13:22:00 -07:00
Evan Czaplicki
4e8898bef1 Remove unused references to Unique 2013-08-31 02:59:43 -07:00
Evan Czaplicki
6ba2d70365 Revert 95ec3a8..1a093ac
This rolls back to commit 95ec3a822e.
2013-08-29 16:43:54 -07:00
Evan Czaplicki
7c159b294a Enable parsing of basic markdown interpolation
No interpolated values are actually used, but they are type checked.
2013-08-29 13:00:38 -07:00
Evan Czaplicki
1a093ac53a Properly turn off custom OpTables
oops!
2013-08-29 02:57:01 -07:00
Evan Czaplicki
65dcc0b57e Turn off custom OpTables for now 2013-08-29 02:55:49 -07:00
Evan Czaplicki
d7c89ee07c support cross-module OpTables 2013-08-29 02:53:20 -07:00
Evan Czaplicki
f1a88975d2 Add iParse that takes a table 2013-08-29 00:55:32 -07:00