about summary refs log tree commit diff
path: root/src/comp/syntax/codemap.rs
AgeCommit message (Collapse)AuthorLines
2012-03-02Move src/comp to src/rustcGraydon Hoare-204/+0
2012-02-23Finish cleanup of core::strMarijn Haverbeke-7/+5
Closes #1849
2012-02-23Various cleanups and optimizations in core::strMarijn Haverbeke-4/+4
2012-02-23(core::str) rename substr_len_bytes to substr_len, and delete unused ↵Kevin Cantu-1/+1
byte_index[_from]
2012-02-23(core::str) remove len_bytes aliasKevin Cantu-3/+2
2012-02-23(core::str) replace uses of unsafe::slice_bytes; replace find[_from]_bytes ↵Kevin Cantu-1/+1
with find[_from]
2012-02-23(core::str) replace byte_index[_from] with index[_from]Kevin Cantu-1/+1
2012-02-23(core::char) rename slice -> slice_charsKevin Cantu-2/+2
2012-02-23(core::str) mostly rename len -> len_charsKevin Cantu-2/+2
2012-02-16core: rewrite str::byte_index to use vec functionsErick Tryzelaar-1/+2
2012-02-15Fix bad line printing for parse errorsMarijn Haverbeke-10/+5
The code that extracted lines from partially-parsed files was broken. Closes #1848
2012-02-14Use file_substr rather than <anon> when re-parsing quasi-quotesKevin Atkinson-6/+2
for better error messages.
2012-02-14Do a better job of reporting source location for files (i.e. filemap)Kevin Atkinson-2/+44
that are really a substr of another file.
2012-02-14Change file_substr to allow for external strings.Kevin Atkinson-7/+10
2012-02-12(core::str) rename byte_len_range -> substr_len_bytes andKevin Cantu-1/+1
rename char_len_range -> substr_len_chars
2012-02-11using str::index...Kevin Cantu-5/+2
2012-02-11core::str rename [r]index -> [r]index_bytesKevin Cantu-1/+1
2012-02-09Remove some pointless importsMarijn Haverbeke-3/+0
2012-02-05Fix macro backtraces.Kevin Atkinson-29/+9
In addition add information about the macro doing the expansion, and move the printing of the expansion backtrace from codemap::span_to_str to the diagnostic code. The backtrace is now more verbose and includes information on the macro doing the expansion, in addition to the expansion site.
2012-02-03Fix various drift issues in the qq branch.Graydon Hoare-17/+7
2012-02-03Formatting cleanups.Kevin Atkinson-1/+1
2012-02-03Store info about file "substr".Kevin Atkinson-4/+24
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-03Don't rely on filename to get a file from the filemapKevin Atkinson-9/+15
as there may be more than one filemap with the same filename (in the case of stdin for instance). This involved storing a pointer to the filemap rather than the filename in location info such as codemap::pos.
2012-02-03Bug fix in lookup_byte_offset.Kevin Atkinson-1/+1
2012-02-03Add function to get a code snippet from a span,Kevin Atkinson-3/+40
and also to get the byte offset within a string from a span chpos.
2012-02-01Rename (again) str::unsafe::slice -> str::unsafe::slice_bytes andKevin Cantu-2/+2
str::unsafe::safe_slice -> str::unsafe::slice_bytes_safe_range
2012-02-01Propagating unsafe::slice 3Kevin Cantu-3/+3
2012-01-31Change option::t to optionTim Chevalier-1/+1
Now that core exports "option" as a synonym for option::t, search-and- replace option::t with option. The only place that still refers to option::t are the modules in libcore that use option, because fixing this requires a new snapshot (forthcoming).
2012-01-26Use string stored in codemap for pretty-printing comments and literalsMarijn Haverbeke-0/+1
Closes #1665
2012-01-25Keep source file around after parsing.Kevin Atkinson-7/+9
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-23Revert "rustc: Exclude stdin from codemap files when lookup_pos".Kevin Atkinson-5/+3
Need a better fix, right now it is just causing even more confusion, for example in issue #1448 and #1387. This reverts commit 1e4de333740690357a8f58883c5c69bf58be1424.
2012-01-19rustc: ";" to "," in enumsPatrick Walton-2/+2
2012-01-19rustc: "tag" -> "enum"Patrick Walton-1/+1
2012-01-18Remove '.' after nullary tags in patternsTim Chevalier-1/+1
Does what it says on the tin. The next commit will remove support for this syntax.
2012-01-13rustc: Extract driver::diagnostic from syntax::codemapBrian Anderson-132/+0
2012-01-13rustc: Some more codemap refactoringBrian Anderson-74/+67
2012-01-13rustc: Refactor codemap::emit_* functionsBrian Anderson-17/+19
A codemap is only needed when we have a span so put them both into the option.
2012-01-13deprecate fn exprs and the fn() type, preferring fn@ and native fnNiko Matsakis-1/+1
2012-01-11Major clean-up of std::ioMarijn Haverbeke-2/+3
Use ifaces instead of objs, stop wrapping everything in two (or three) layers of no-value-added indirection, and remove some of the more pointless/outdated idioms from the code.
2011-12-21rustc: Exclude stdin from codemap files when lookup_posHaitao Li-3/+5
Fixes issue #1362
2011-12-20Inject "core macros" into default syntax-expansion environment. Bit of a ↵Graydon Hoare-1/+5
kludge but enough to work on logging-via-macros.
2011-12-13Copy first batch of material from libstd to libcore.Graydon Hoare-2/+3
2011-11-24rustc: Fix position of diagnostic highlight linesHaitao Li-1/+1
Diagnostic highlight lines are incorrect placed when the related line number is 10, 100, etc. The root cause is line number are treated as 0 based (should be 1 based) when calculating offset of line number digits.
2011-11-17remove compile-command from local variable blocksNiko Matsakis-1/+0
2011-10-29stdlib: Make io failures recoverable by returning a resultBrian Anderson-2/+8
2011-10-28rustc: Extract error reporting from codemapBrian Anderson-13/+42
2011-10-27Use the std::term color constants in the codemapBrian Anderson-3/+3
Exported constants work now. Woo!
2011-10-21Remove last uses of iterators from stdlibMarijn Haverbeke-3/+1
Issue #1056
2011-09-12Factor imports mindlessly.Graydon Hoare-8/+2
2011-09-12Reformat for new mode syntax, step 1Marijn Haverbeke-8/+8
Long lines were fixed in a very crude way, as I'll be following up with another reformat in a bit.