Commit Graph

55 Commits

Author SHA1 Message Date
Michael Sullivan
329eca6044 Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725. 2012-06-25 20:00:46 -07:00
Paul Stansifer
1e36d216be Add the interner to parse_sess. 2012-06-15 12:41:41 -07:00
Brian Anderson
ce750a7dbc Box AST idents 2012-06-13 11:30:45 -07:00
Paul Stansifer
5b72e52e47 Access parse/attrs.rs with an impl. 2012-05-24 14:39:22 -07:00
Brian Anderson
1f52652a06 rustc: Eliminate some indirection to the syntax crate 2012-05-13 17:33:29 -07:00
Brian Anderson
628e80d525 syntax: Extract attribute parsing to its own mod 2012-04-19 21:58:45 -07:00
Brian Anderson
9a8a04629e syntax: Put the main parser interface in mod parse 2012-04-18 10:50:50 -07:00
Brian Anderson
4f576275be syntax: Cleanup attr module. Closes #1545 2012-04-15 01:43:38 -07:00
Brian Anderson
0e87039348 rustc: Remove the rustsyntax::attr wrapper in front 2012-03-29 14:42:31 -07:00
Graydon Hoare
6e6798c4e1 Bulk-edit mutable -> mut. 2012-03-26 18:35:18 -07:00
Brian Anderson
f9755c666d rustdoc: Simplify attribute parsing 2012-03-09 18:13:14 -08:00
Brian Anderson
0905ad2bbe rustdoc: Vastly simplify the document model
Don't attempt to impose any structure for documenting arguments, return
values, etc.
2012-03-09 17:24:56 -08:00
Brian Anderson
7f66df714a rustdoc: Support #[doc(hidden)] 2012-03-07 14:50:39 -08:00
Brian Anderson
cec1679cf6 rustdoc: Simplify attr pass 2012-02-17 16:52:27 -08:00
Kevin Atkinson
74b4345a38 Change file_substr to allow for external strings. 2012-02-14 19:37:33 -08:00
Brian Anderson
67b1034989 rustdoc: Resolve some FIXMEs 2012-02-05 16:38:18 -08:00
Kevin Atkinson
9090a5c03b Store info about file "substr".
That is when a string that is part of a file needs to be parsed for a
reason, record that the string is a substr of the file rather than
using "<anon>" or "-" as the file name.  This will eventually allow
pointing to the right location, for now it just uses a more
meaningful string for the filename.
2012-02-03 20:41:49 -07:00
Brian Anderson
2b67de06c8 rustdoc: Add support for type items 2012-02-01 22:41:54 -08:00
Brian Anderson
496205c85f rustdoc: Pull impl docs out of attributes 2012-01-31 19:32:27 -08:00
Brian Anderson
b8a683415c rustdoc: Add attribute parsing for ifaces and methods 2012-01-30 19:37:32 -08:00
Brian Anderson
2efc6004b5 rustdoc: Parse resource doc attributes 2012-01-26 21:20:17 -08:00
Brian Anderson
a25bc195e2 rustdoc: Parse variant doc attributes 2012-01-25 21:04:53 -08:00
Brian Anderson
87c3a5c1a3 rustdoc: Extract some common functions from attr_parser 2012-01-25 21:04:52 -08:00
Brian Anderson
259ea4e4b4 rustdoc: Parse enum doc attributes 2012-01-25 21:04:52 -08:00
Brian Anderson
5166cc29e9 rustdoc: Fix a copy&paste bug in attr_parser tests 2012-01-25 21:04:52 -08:00
Kevin Atkinson
c5e03e0e59 Keep source file around after parsing.
Specifically box the string (to avoid unnecessary copies) and store it
in codemap::filemap.

Remove the hack in driver::diagnostic that rereads the source from the
file and instead just get the source from the filemap.

(This commit is also a prerequisite for issue #1612)
2012-01-25 16:00:47 -07:00
Brian Anderson
45a668c439 rustdoc: Update tests for rustc diagnostic changes 2012-01-24 23:24:31 -08:00
Brian Anderson
6d8058451b rustdoc: Parse fn failure conditions 2012-01-24 18:02:33 -08:00
Brian Anderson
c93c6358cb rustdoc: Add parsing of const attribute docs 2012-01-24 00:38:35 -08:00
Kevin Atkinson
ad21d9c64a Don't reset the chpos/byte_pos to 0 in new_parser_from_source_str.
This correctly fixes issue #1362.

chpos/byte_pos are now the offsets within a particular file, but
rather the offsets within a virtual file with is formed by combing all
of the modules within a crate.  Thus, resetting them to 0 causes an
overlap and hence, bogus source locations.

Fix #1362 by moving chpos/byte_pos to parse_sess so that
new_parser_from_source_str has access to them and hence can chose an
initial value that is not already been used in the crate.

Note that the trigger for bug 1361 was that syntax/ext/expand.rs calls
parse_expr_from_source_str (which calls new_parser_from_source_str)
using the same codemap as the current crate (and hence causing overlap
with files in the crate as new_parser_from_source_str resets the
chpos/byte_pos to 0).
2012-01-23 17:37:15 -08:00
Brian Anderson
50d8e9f2a1 Revert "rustdoc: Get the crate brief description from the 'desc' attr"
This reverts commit 521e58a3c4.

Some crates use 'desc', some 'comment' - I want them to just use 'doc'
2012-01-23 16:23:08 -08:00
Brian Anderson
521e58a3c4 rustdoc: Get the crate brief description from the 'desc' attr 2012-01-23 15:16:14 -08:00
Tim Chevalier
04a2887f87 Remove '.' after nullary tags in patterns
Does what it says on the tin.

The next commit will remove support for this syntax.
2012-01-18 23:17:34 -08:00
Brian Anderson
20b8509594 rustdoc: Add mod docs attrs to the doc tree 2012-01-18 19:59:24 -08:00
Brian Anderson
08da893cdb rustdoc: Parse module docs 2012-01-18 19:59:23 -08:00
Brian Anderson
60b475ea88 rustdoc: Parse crate name from #[link] attr 2012-01-18 15:02:43 -08:00
Brian Anderson
810af2dada rustdoc: Put fn docs inside fn bodies 2012-01-18 15:02:43 -08:00
Brian Anderson
9191911499 rustdoc: Document attr_parser::doc_meta 2012-01-18 15:02:42 -08:00
Brian Anderson
e23e45bc6d rustdoc: Add rustdocs 2012-01-17 17:45:37 -08:00
Lenny222
b19fdcced2 libstd => libcore 2012-01-17 10:51:43 -08:00
Lenny222
106dcf7b92 spin-off rustdocs tuple code to libstd 2012-01-17 10:51:43 -08:00
Brian Anderson
bd63c3928e rustc: Move some attribute accessors from rustdoc to rustc 2012-01-16 21:12:36 -08:00
Brian Anderson
4f2ad6b124 rustdoc: Move fst and snd into util mod 2012-01-16 21:12:36 -08:00
Brian Anderson
75dbb0f193 rustdoc: Use attr API in attr_parser 2012-01-16 21:12:36 -08:00
Brian Anderson
29409afe1a rustdoc: Add a fallthrough path to meta_item search in parse_fn 2012-01-16 21:12:35 -08:00
Brian Anderson
d455d46b15 rustdoc: Remove non-attribute related stuff from attr_parser 2012-01-16 21:12:35 -08:00
Brian Anderson
22d182acd7 rustdoc: Remove attribute parsing from extract module 2012-01-16 21:12:35 -08:00
Brian Anderson
e77b8db707 rustdoc: Convert fn return type to retdoc record 2012-01-16 21:12:34 -08:00
Brian Anderson
63dcc64275 rustdoc: Change fndoc's arg list to a vec from map 2012-01-16 21:12:34 -08:00
Brian Anderson
5f25804f46 rustdoc: Push imports down into submodules 2012-01-16 21:12:34 -08:00