about summary refs log tree commit diff
path: root/src/libsyntax/ext/asm.rs
AgeCommit message (Collapse)AuthorLines
2015-12-15Move built-in syntax extensions to a separate crateSeo Sanghyeon-245/+0
2015-12-05Use a struct instead of a tuple for inline asm output operandsAmanieu d'Antras-1/+6
2015-12-05Add proper support for indirect output constraints in inline asmAmanieu d'Antras-3/+4
2015-11-26Add syntax support for attributes on expressions and all syntaxMarvin Löbel-1/+2
nodes in statement position. Extended #[cfg] folder to allow removal of statements, and of expressions in optional positions like expression lists and trailing block expressions. Extended lint checker to recognize lint levels on expressions and locals.
2015-11-10Rename _nopanic methods to remove the suffix.Eli Friedman-3/+3
Just `sed s/_nopanic//g`. Hopefully makes libsyntax a bit more readable.
2015-11-03Allow indirect operands to be used as inputs for inline asmAmanieu d'Antras-2/+2
2015-10-27Don't use panicking helpers in Parser.Eli Friedman-3/+3
2015-09-21Use ast::AsmDialect's variants qualified, and drop the pointless prefix.Ms2ger-2/+3
2015-09-08Allow tracking issues for lang features.Huon Wilson-1/+3
This is similar to the libs version, which allow an `issue` field in the `#[unstable]` attribute. cc #28244
2015-08-28Move ExpnInfo to NameManish Goregaokar-2/+2
2015-08-27Enumify CompilerExpansion in ExpnInfoManish Goregaokar-2/+1
2015-04-14Negative case of `len()` -> `is_empty()`Tamir Duberstein-3/+3
`s/([^\(\s]+\.)len\(\) [(?:!=)>] 0/!$1is_empty()/g`
2015-04-05Add comments suggested by NikoPhil Dawes-11/+0
2015-04-05Work towards a non-panicing parser (libsyntax)Phil Dawes-14/+25
- Functions in parser.rs return PResult<> rather than panicing - Other functions in libsyntax call panic! explicitly for now if they rely on panicing behaviour. - 'panictry!' macro added as scaffolding while converting panicing functions. (This does the same as 'unwrap()' but is easier to grep for and turn into try!()) - Leaves panicing wrappers for the following functions so that the quote_* macros behave the same: - parse_expr, parse_item, parse_pat, parse_arm, parse_ty, parse_stmt
2015-03-06Add #[allow_internal_unstable] to track stability for macros better.Huon Wilson-0/+1
Unstable items used in a macro expansion will now always trigger stability warnings, *unless* the unstable items are directly inside a macro marked with `#[allow_internal_unstable]`. IOW, the compiler warns unless the span of the unstable item is a subspan of the definition of a macro marked with that attribute. E.g. #[allow_internal_unstable] macro_rules! foo { ($e: expr) => {{ $e; unstable(); // no warning only_called_by_foo!(); }} } macro_rules! only_called_by_foo { () => { unstable() } // warning } foo!(unstable()) // warning The unstable inside `foo` is fine, due to the attribute. But the `unstable` inside `only_called_by_foo` is not, since that macro doesn't have the attribute, and the `unstable` passed into `foo` is also not fine since it isn't contained in the macro itself (that is, even though it is only used directly in the macro). In the process this makes the stability tracking much more precise, e.g. previously `println!("{}", unstable())` got no warning, but now it does. As such, this is a bug fix that may cause [breaking-change]s. The attribute is definitely feature gated, since it explicitly allows side-stepping the feature gating system.
2015-03-02Use `const`s instead of `static`s where appropriateFlorian Zeitz-1/+1
This changes the type of some public constants/statics in libunicode. Notably some `&'static &'static [(char, char)]` have changed to `&'static [(char, char)]`. The regexp crate seems to be the sole user of these, yet this is technically a [breaking-change]
2015-02-27Replace MacExpr / MacPat / MacItems with MacEagerKeegan McAllister-1/+1
MacEager is a MacResult implementation for the common case where you've already built each form of AST that you might return. Fixes #17637. Based on #18814. This is a [breaking-change] for syntax extensions: * MacExpr::new becomes MacEager::expr. * MacPat::new becomes MacEager::pat. * MacItems::new becomes MacEager::items. It takes a SmallVector directly, not an iterator.
2015-02-20Remove remaining uses of `[]`. This time I tried to use deref coercions ↵Niko Matsakis-1/+1
where possible.
2015-02-15Address the `asm!` case of #22234.Felix S. Klock II-0/+7
2015-02-06Update to last version, remove "[]" as much as possibleGuillaumeGomez-1/+1
2015-02-06Libsyntax has been updatedGuillaumeGomez-6/+4
2015-02-06Replace the get method by the deref one on InternedStringGuillaumeGomez-4/+6
2015-01-14Disallow a form of invalid asm! macroSimonas Kazlauskas-0/+6
Fixes #21045
2015-01-07use slicing sugarJorge Aparicio-2/+2
2015-01-07Replace full slice notation with index callsNick Cameron-1/+1
2014-12-21Fallout of std::str stabilizationAlex Crichton-2/+1
2014-12-03Replace `equiv` method calls with `==` operator sugarJorge Aparicio-4/+4
2014-11-30auto merge of #19415 : P1start/rust/error-message-fixes, r=alexcrichtonbors-1/+1
This is the style followed by most other error messages.
2014-11-30Adjust some error messages to start with a lowercase letter and not finish ↵P1start-1/+1
with a full stop
2014-11-30syntax: Make `asm!` clobbers a proper vector.Kang Seonghoon-7/+3
Otherwise `--pretty expanded` diverges.
2014-11-18rollup merge of #18911: canndrew/slice_shift_charJakub Bukaj-2/+2
`slice_shift_char` splits a `str` into it's leading `char` and the remainder of the `str`. Currently, it returns a `(Option<char>, &str)` such that: "bar".slice_shift_char() => (Some('b'), "ar") "ar".slice_shift_char() => (Some('a'), "r") "r".slice_shift_char() => (Some('r'), "") "".slice_shift_char() => (None, "") This is a little odd. Either a `str` can be split into both a head and a tail or it cannot. So the return type should be `Option<(char, &str)>`. With the current behaviour, in the case of the empty string, the `str` returned is meaningless - it is always the empty string. This PR changes `slice_shift_char` so that: "bar".slice_shift_char() => Some(('b', "ar")) "ar".slice_shift_char() => Some(('a', "r")) "r".slice_shift_char() => Some(('r', "")) "".slice_shift_char() => None
2014-11-17Switch to purely namespaced enumsSteven Fackler-0/+1
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-11-17change return type of slice_shift_charAndrew Cann-2/+2
`slice_shift_char` splits a `str` into it's leading `char` and the remainder of the `str`. Currently, it returns a `(Option<char>, &str)` such that: "bar".slice_shift_char() => (Some('b'), "ar") "ar".slice_shift_char() => (Some('a'), "r") "r".slice_shift_char() => (Some('r'), "") "".slice_shift_char() => (None, "") This is a little odd. Either a `str` can be split into both a head and a tail or it cannot. So the return type should be `Option<(char, &str)>`. With the current behaviour, in the case of the empty string, the `str` returned is meaningless - it is always the empty string. This commit changes slice_shift_char so that: "bar".slice_shift_char() => Some(('b', "ar")) "ar".slice_shift_char() => Some(('a', "r")) "r".slice_shift_char() => Some(('r', "")) "".slice_shift_char() => None [breaking-change]
2014-10-30Use common variants for open and close delimitersBrendan Zabarauskas-4/+4
This common representation for delimeters should make pattern matching easier. Having a separate `token::DelimToken` enum also allows us to enforce the invariant that the opening and closing delimiters must be the same in `ast::TtDelimited`, removing the need to ensure matched delimiters when working with token trees.
2014-10-28Use PascalCase for token variantsBrendan Zabarauskas-23/+23
2014-09-28Keep ExpnId abstract by providing conversionsKeegan McAllister-1/+1
2014-09-27Translate inline assembly errors back to source locationsKeegan McAllister-1/+12
Fixes #17552.
2014-09-14syntax: fix fallout from using ptr::P.Eduard Burtescu-4/+3
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-2/+2
2014-08-24Adjust the error messages to match the pattern "expected foo, found bar"Jonas Hietala-1/+1
Closes #8492
2014-08-19Fix double evaluation of read+write operandsPiotr Czarnecki-14/+4
Stop read+write expressions from expanding into two occurences in the AST. Add a bool to indicate whether an operand in output position if read+write or not. Fixes #14936
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-2/+2
[breaking-change]
2014-07-03Simplify creating a parser from a token treePiotr Jawniak-7/+1
Closes #15306
2014-06-15Register new snapshotsAlex Crichton-23/+0
2014-06-14rustc: Obsolete the `@` syntax entirelyAlex Crichton-0/+2
This removes all remnants of `@` pointers from rustc. Additionally, this removes the `GC` structure from the prelude as it seems odd exporting an experimental type in the prelude by default. Closes #14193 [breaking-change]
2014-06-11std: Remove i18n/l10n from format!Alex Crichton-0/+23
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-11syntax: Move the AST from @T to Gc<T>Alex Crichton-2/+1
2014-05-27std: Remove String's to_ownedRicho Healey-1/+1
2014-05-22libcore: Remove all uses of `~str` from `libcore`.Patrick Walton-1/+3
[breaking-change]
2014-05-22libstd: Remove all uses of `~str` from `libstd`Patrick Walton-1/+1