John Benediktsson
3ee93ee68d
lexer: cleanup docs for $slots.
2020-05-27 09:59:42 -07:00
John Benediktsson
77cd3aaede
classes: use check-instance in a few places, to remove duplication.
2020-01-15 10:34:47 -08:00
Björn Lindqvist
1ca8276df4
basis/,core/,extra/: many new tags
2017-07-06 23:04:18 +02:00
Björn Lindqvist
20711a0fd3
Adding escaping to CHAR: " -> CHAR: \"
...
It is not necessary to escape the " character, but it doesn't hurt and
is necessary for syntax-highlighting (FUEL) to work correctly.
2016-09-04 06:40:43 +02:00
John Benediktsson
77c256412d
lexer: make CHAR: ! work.
2016-03-30 21:21:40 -07:00
John Benediktsson
52a3f6f309
lexer: support universal comments.
2016-03-30 21:09:08 -07:00
John Benediktsson
35ca557ce7
core: use $sequence help-markup in a few places.
2016-03-16 10:13:56 -07:00
John Benediktsson
eaa65bc66f
lexer: change shebang handling to be in skip-blank.
...
It previously required "#!" to be defined like "!", now it doesn't.
2015-09-10 17:53:04 -07:00
John Benediktsson
ceb75057da
change ERROR: words from throw-foo back to foo.
2015-08-13 16:13:05 -07:00
Doug Coleman
02008979d9
factor: Change ERROR: foo ; to define ``throw-foo`` instead of having ``foo`` throw implicitly. The old ``foo`` still throws implicitly because this is a big change to get right in one patch, but it should be removed soon.
2015-08-12 15:26:18 -05:00
John Benediktsson
527c4ea2f8
lexer: change with-lexer to use with-variable.
2015-06-29 19:31:24 -07:00
John Benediktsson
ab3f3173af
change errors to use "object" instead of "obj".
2014-12-01 08:04:49 -08:00
John Benediktsson
57f9d78892
improve help by linking to types directly.
2014-05-23 20:20:15 -07:00
John Benediktsson
8afe2dfe37
lexer: change skip back to public interface.
2014-05-20 09:42:41 -07:00
John Benediktsson
a38524eb99
lexer/parser: rename (scan-token) to ?scan-token, (scan-datum) to ?scan-datum.
2014-05-20 09:13:58 -07:00
John Benediktsson
98abd95040
lexer: more type checking.
2014-05-20 08:53:41 -07:00
John Benediktsson
a0c5e492dd
lexer: change line-text to always be a string.
2014-05-19 14:31:08 -07:00
John Benediktsson
98935b7f15
docs: change ``{ $quotation "( x -- y )" }`` to ``{ $quotation ( x -- y ) }``.
2014-05-18 20:09:10 -07:00
John Benediktsson
d3acf4d482
lexer: cleanup a bit.
2014-02-21 08:36:31 -08:00
Doug Coleman
2d9a15c7c1
lexer, parser: Rename unexpected-eof.
2013-03-23 21:35:50 -07:00
John Benediktsson
5487480126
core: cleanup USING lists.
2013-03-05 10:34:47 -08:00
John Benediktsson
8c69ea5562
lexer: typed slots.
2012-07-27 16:05:28 -07:00
John Benediktsson
4e72d80256
Using "same?" in more places.
2012-07-21 10:22:44 -07:00
Joe Groff
2cf8b32bda
lexer: skip #! as a single token at front of line
...
Fixes #370
2011-11-27 14:59:54 -08:00
Doug Coleman
dc0a921866
Remove the lexer-factory because nothing uses it. Update usages.
2011-10-29 01:11:19 -07:00
John Benediktsson
d61de12011
Cleanup more lint warnings.
2011-10-14 12:31:46 -07:00
Doug Coleman
76580da5d5
Refactor the lexer/parser to expose friendlier words for scanning tokens. The preferred top-level words now throw an exception on EOF.
...
CREATE -> scan-new
CREATE-CLASS -> scan-new-class
CREATE-WORD -> scan-new-word
CREATE-GENERIC -> scan-new-generic
scan -> (scan-token)
scan-token now throws on eof
(scan-word) returns word/number/f
scan-word now throws on eof
scan-word-name expects a non-number
Fixes #183 .
Fixes #209 .
2011-09-29 11:28:28 -07:00
John Benediktsson
842327f3df
lexer: more clear code.
2011-09-17 08:14:13 -07:00
Slava Pestov
8a0525e5ce
Add a scan-token word which is like scan, except throws an error on EOF; document scan-object word; mention that scan-token/scan-object are preferred over scan/scan-word
2010-07-06 16:20:08 -04:00
Slava Pestov
627295f094
Language change: tuple slot setter words with stack effect ( value object -- ) are now named FOO<< instead of (>>FOO)
2010-05-06 17:21:02 -04:00
Slava Pestov
dde21c3cc4
lexer: fix output type of map-tokens
2010-03-26 16:31:48 -04:00
Slava Pestov
a566d8cc6b
lexer: each-token and map-tokens did not handle EOF properly
2010-03-26 03:42:07 -04:00
Joe Groff
18f3df9d4a
more help-lint
2010-03-09 21:02:43 -08:00
Joe Groff
10ca2ba695
add polymorphic effects for lexer:each-token, map-tokens
2010-03-08 18:55:46 -08:00
Joe Groff
afaaf30679
Merge branch 'lexer-parsing-word-errors'
2010-03-02 20:46:23 -08:00
Joe Groff
2c5deba1d1
parse-tokens had two $notes sections. oops!
2010-03-01 11:50:16 -08:00
Joe Groff
51541bb35b
lexer, parser: update docs on "parse-tokens" and add docs for "each-token", "map-tokens"
2010-03-01 11:47:57 -08:00
Joe Groff
9bf5c76771
lexer: add "each-token" and "map-tokens", which are equivalent to "parse-token _ each/map" but incremental. update a smattering of parsing words (such as USING:, SYMBOLS:, etc.) to use each-token/map-tokens
2010-02-28 22:19:43 -08:00
Joe Groff
163c26ad72
lexer, parser: show initial parsing word line as part of lexer-errors
2010-02-28 13:01:03 -08:00
Keith Lazuka
405e5d015b
docs: change $subsection to $subsections
2009-10-02 12:15:48 -04:00
Doug Coleman
308d383ccd
small fix for lexer
2009-08-18 00:10:23 -05:00
Slava Pestov
3b2fd98e7c
Refactor source-file-errors a little bit to remove some code duplication, and so that clicking 'Edit' in error list tool works for parse errors in unit tests
2009-08-04 21:01:21 -05:00
Samuel Tardieu
cb03fe43db
Forbid tabs in source code
2009-06-16 20:49:28 +02:00
Doug Coleman
0ad6d1fb7b
add a few usages of iota, remove most 1+ and 1- from core
2009-05-01 19:58:24 -05:00
Slava Pestov
669548e62e
Clean up some usages of tuck, and add Joe's curried cleave/spread/apply combinators to kernel vocabulary
2009-02-02 13:43:54 -06:00
Slava Pestov
a4d9cdfeb3
Refactor all usages of >r/r> in core to use dip, 2dip, 3dip
...
Non-optimizing compiler now special-cases dip, 2dip, 3dip following a
literal quotation: this allows us to break the dip/slip meta-circle
without explicit calls to >r/r>
2008-11-23 02:44:56 -06:00
Slava Pestov
9628bcd646
New 'expect' word, which is a more correct version of the 'scan assert=' idiom
2008-11-22 17:27:40 -06:00
Slava Pestov
9bf63b1613
New $quotation markup element
2008-11-16 09:03:30 -06:00
Slava Pestov
93e9e34175
Add $maybe markup element
2008-11-16 06:02:13 -06:00
Slava Pestov
79f3865f92
Add missing meta-data
2008-09-23 16:11:59 -05:00