summary refs log tree commit diff
path: root/src/librustdoc/html/highlight.rs
AgeCommit message (Collapse)AuthorLines
2014-08-18libsyntax: Remove the `use foo = bar` syntax from the language in favorPatrick Walton-6/+4
of `use bar as foo`. Change all uses of `use foo = bar` to `use bar as foo`. Implements RFC #47. Closes #16461. [breaking-change]
2014-07-15Fix errorsAdolfo OchagavĂ­a-1/+0
2014-07-15Deprecate `str::from_utf8_lossy`Adolfo OchagavĂ­a-1/+1
Use `String::from_utf8_lossy` instead [breaking-change]
2014-07-09lexer: lex WS/COMMENT/SHEBANG rather than skippingCorey Richardson-25/+16
Now, the lexer will categorize every byte in its input according to the grammar. The parser skips over these while parsing, thus avoiding their presence in the input to syntax extensions.
2014-07-09syntax: don't parse numeric literals in the lexerCorey Richardson-2/+1
This removes a bunch of token types. Tokens now store the original, unaltered numeric literal (that is still checked for correctness), which is parsed into an actual number later, as needed, when creating the AST. This can change how syntax extensions work, but otherwise poses no visible changes. [breaking-change]
2014-07-08Change DST syntax: type -> Sized?Nick Cameron-1/+1
closes #13367 [breaking-change] Use `Sized?` to indicate a dynamically sized type parameter or trait (used to be `type`). E.g., ``` trait Tr for Sized? {} fn foo<Sized? X: Share>(x: X) {} ```
2014-06-17Add br##"xx"## raw byte string literals.Simon Sapin-1/+1
2014-06-17Add a b"xx" byte string literal of type &'static [u8].Simon Sapin-1/+2
2014-06-17Add a b'x' byte literal of type u8.Simon Sapin-1/+1
2014-06-15Register new snapshotsAlex Crichton-1/+1
2014-06-06rustdoc: Submit examples to play.rust-lang.orgAlex Crichton-3/+10
This grows a new option inside of rustdoc to add the ability to submit examples to an external website. If the `--markdown-playground-url` command line option or crate doc attribute `html_playground_url` is present, then examples will have a button on hover to submit the code to the playground specified. This commit enables submission of example code to play.rust-lang.org. The code submitted is that which is tested by rustdoc, not necessarily the exact code shown in the example. Closes #14654
2014-06-04syntax: methodify the lexerCorey Richardson-1/+1
2014-05-27std: Rename strbuf operations to stringRicho Healey-3/+3
[breaking-change]
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-1/+1
[breaking-change]
2014-05-23syntax: Clean out obsolete syntax parsingAlex Crichton-1/+1
All of these features have been obsolete since February 2014, where most have been obsolete since 2013. There shouldn't be any more need to keep around the parser hacks after this length of time.
2014-05-13Touch up and rebase previous commitsAlex Crichton-0/+1
* Added `// no-pretty-expanded` to pretty-print a test, but not run it through the `expanded` variant. * Removed #[deriving] and other expanded attributes after they are expanded * Removed hacks around &str and &&str and friends (from both the parser and the pretty printer). * Un-ignored a bunch of tests
2014-05-12librustdoc: Remove all `~str` usage from librustdoc.Patrick Walton-2/+2
2014-05-08libsyntax: Remove uses of `~str` from libsyntax, and fix falloutPatrick Walton-6/+8
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-2/+2
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-1/+1
2014-04-06De-~[] Mem{Reader,Writer}Steven Fackler-1/+1
2014-03-28Used inherited mutability in lexer::Reader.Eduard Burtescu-2/+2
2014-03-17Fix rustdoc and tests.Eduard Burtescu-6/+3
2014-03-17De-@ ParseSess uses.Eduard Burtescu-3/+3
2014-03-02rustdoc: syntax highlight macro definitions, colour $... substitutions.Huon Wilson-7/+18
Macro definitions are just their raw source code, and so should be highlighted where possible. Also, $ident non-terminal substitutions are special, and so are worth of a little special treatment.
2014-02-28rustdoc: Capture all output from rustc by defaultAlex Crichton-1/+1
This helps prevent interleaving of error messages when running rustdoc tests. This has an interesting bit of shuffling with I/O handles, but other than that this is just using the APIs laid out in the previous commit. Closes #12623
2014-02-23rustdoc: Add syntax highlightingAlex Crichton-0/+174
This adds simple syntax highlighting based off libsyntax's lexer to be sure to stay up to date with rust's grammar. Some of the highlighting is a bit ad-hoc, but it definitely seems to get the job done! This currently doesn't highlight rustdoc-rendered function signatures and structs that are emitted to each page because the colors already signify what's clickable and I think we'd have to figure out a different scheme before colorizing them. This does, however, colorize all code examples and source code. Closes #11393