[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode f57a8eb 333/486: Merge pull request #233 from sh
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode f57a8eb 333/486: Merge pull request #233 from shanavas786/add-128 |
Date: |
Sat, 7 Aug 2021 09:25:47 -0400 (EDT) |
branch: elpa/rust-mode
commit f57a8ebfc33de72e0ca6fe61ed3d7a622510b5b3
Merge: 6e9db46 0ded5ea
Author: Tom Tromey <tom@tromey.com>
Commit: GitHub <noreply@github.com>
Merge pull request #233 from shanavas786/add-128
Add support for u128 and i128 types
---
rust-mode.el | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/rust-mode.el b/rust-mode.el
index ed5b5ed..97b5c3c 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -544,6 +544,7 @@ buffer."
"u16" "i16"
"u32" "i32"
"u64" "i64"
+ "u128" "i128"
"f32" "f64"
"float" "int" "uint" "isize" "usize"
@@ -753,7 +754,7 @@ match data if found. Returns nil if not within a Rust
string."
can have a where clause, rewind back to just before the name of
the subject of that where clause and return the new point.
Otherwise return nil"
-
+
(let* ((ident-pos (point))
(newpos (save-excursion
(rust-rewind-irrelevant)
@@ -796,7 +797,7 @@ match data if found. Returns nil if not within a Rust
string."
;; A type alias or ascription could have a type param list. Skip
backwards past it.
(when (member token '(ambiguous-operator open-brace))
(rust-rewind-type-param-list))
-
+
(cond
;; Certain keywords always introduce expressions
@@ -811,7 +812,7 @@ match data if found. Returns nil if not within a Rust
string."
;; An ident! followed by an open brace is a macro invocation. Consider
;; it to be an expression.
((and (equal token 'open-brace) (rust-looking-back-macro)) t)
-
+
;; In a brace context a "]" introduces an expression.
((and (eq token 'open-brace) (rust-looking-back-str "]")))
@@ -828,7 +829,7 @@ match data if found. Returns nil if not within a Rust
string."
(backward-sexp)
(rust-rewind-irrelevant)
(looking-back "[{;]" (1- (point))))
-
+
((rust-looking-back-ident)
(rust-rewind-qualified-ident)
(rust-rewind-irrelevant)
@@ -851,7 +852,7 @@ match data if found. Returns nil if not within a Rust
string."
(rust-rewind-irrelevant)
(rust-looking-back-symbols '("enum" "struct" "union"
"trait" "type"))))))
))
-
+
((equal token 'ambiguous-operator)
(cond
;; An ampersand after an ident has to be an operator rather than a
& at the beginning of a ref type
@@ -882,7 +883,7 @@ match data if found. Returns nil if not within a Rust
string."
(rust-rewind-irrelevant)
(rust-looking-back-str "enum")))))
t)
-
+
;; Otherwise the ambiguous operator is a type if the identifier is
a type
((rust-is-in-expression-context 'ident) t)))
@@ -931,7 +932,7 @@ match data if found. Returns nil if not within a Rust
string."
;; A :: introduces a type (or module, but not an expression in any case)
((rust-looking-back-str "::") nil)
-
+
((rust-looking-back-str ":")
(backward-char)
(rust-is-in-expression-context 'colon))
@@ -970,7 +971,7 @@ match data if found. Returns nil if not within a Rust
string."
(defun rust-is-lt-char-operator ()
"Return t if the < sign just after point is an operator rather
than an opening angle bracket, otherwise nil."
-
+
(let ((case-fold-search nil))
(save-excursion
(rust-rewind-irrelevant)
@@ -982,7 +983,7 @@ match data if found. Returns nil if not within a Rust
string."
((and (rust-looking-back-str "<")
(not (equal 4 (rust-syntax-class-before-point)))
(not (rust-looking-back-str "<<"))))
-
+
;; On the other hand, if we are after a closing paren/brace/bracket it
;; can only be an operator, not an angle bracket. Likewise, if we are
;; after a string it's an operator. (The string case could actually be
@@ -1010,7 +1011,7 @@ match data if found. Returns nil if not within a Rust
string."
;; The special types can't take type param lists, so a < after one is
;; always an operator
(looking-at rust-re-special-types)
-
+
(rust-is-in-expression-context 'ident)))
;; Otherwise, assume it's an angle bracket
@@ -1045,7 +1046,7 @@ should be considered a paired angle bracket."
;; to balance regardless of the < and >, so if we don't treat any < or >
;; as angle brackets it won't mess up any paren balancing.
((rust-in-macro) t)
-
+
((looking-at "<")
(rust-is-lt-char-operator))
- [nongnu] elpa/rust-mode 8f1297a 281/486: Merge pull request #187 from tspiteri/format-other-buffers, (continued)
- [nongnu] elpa/rust-mode 8f1297a 281/486: Merge pull request #187 from tspiteri/format-other-buffers, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 5c68caf 282/486: Merge pull request #175 from mrBliss/imenu-unsafe, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode f269c5e 292/486: fix syntax of "<" appearing after "?", ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 491ae0e 301/486: Remove unnecessary debugging message, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 60a1f36 310/486: Merge pull request #216 from Aankhen/set-compile-command, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 128601b 317/486: Improve content of `test-project/Cargo.toml'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 30a9d39 322/486: Merge pull request #221 from Wilfred/highlight_union_contextual_keyword, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6093d38 327/486: Add syntax coloring for type-inferred constants and variables, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 38f7d89 330/486: Fix recognition of "<" as operator in some context, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 0ded5ea 332/486: Add support for u128 and i128 types, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode f57a8eb 333/486: Merge pull request #233 from shanavas786/add-128,
ELPA Syncer <=
- [nongnu] elpa/rust-mode 6b71c0a 348/486: fix rust--format-call, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode a90730f 349/486: don't set-window-start for selected window, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 27911c8 351/486: Merge pull request #251 from brotzeit/rust-format-buffer, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 216faf2 353/486: Do not indent where clause by default (follow standard) #257, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode e201404 367/486: Fix font-locking of "let ref", ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 8d32dc6 370/486: Add keywords `async` and `try`, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 54a9c3d 380/486: Merge pull request #296 from dekellum/indent-return-type-defcustom, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode ce7a27f 381/486: Add compilation mode warning face, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode c1059d6 387/486: Added angle bracket tests, some of which fail without the fix, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 06f1c68 389/486: Merge pull request #300 from mmilenko/rust-looking-back-macro--backward-char--fix, ELPA Syncer, 2021/08/07