Commit Graph

32 Commits

Author SHA1 Message Date
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
Brian Anderson 77690baa70 rustdoc: Attach the AST node id to fndocs 2012-01-16 01:07:42 -08:00
Brian Anderson 763f3c4d5b rustdoc: Add regression tests for existing attr parsing behavior 2012-01-16 01:07:42 -08:00
Brian Anderson 01fedcad77 rustdoc: Change parse_fn to take a vector of attributes 2012-01-16 01:07:42 -08:00
Brian Anderson d85fa7c8dc rustdoc: Rename parse_compound_fndoc to parse_fn 2012-01-16 01:07:42 -08:00
Brian Anderson f3c4263635 rustdoc: Move parse_compound_fndoc into mod attr_parser 2012-01-16 01:07:42 -08:00