diff options
author | Theodor Thornhill <theo@thornhill.no> | 2024-03-31 10:43:44 +0200 |
---|---|---|
committer | Theodor Thornhill <theo@thornhill.no> | 2024-03-31 10:43:44 +0200 |
commit | 910ea5f1e55793fa29292730a59397867b4e868f (patch) | |
tree | 3a0d39e850f62f32df81fff84d591e37058531af /test/lisp/progmodes | |
parent | 946d4aad1dfb244352dfd0845a8bc3078fe9bca4 (diff) | |
download | emacs-910ea5f1e55793fa29292730a59397867b4e868f.tar.gz emacs-910ea5f1e55793fa29292730a59397867b4e868f.tar.bz2 emacs-910ea5f1e55793fa29292730a59397867b4e868f.zip |
Make object init more robust (bug#69571)
* lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax): Make the
regex same as before, but conditionally check other heuristics rather
than crazy regex shenanigans.
Diffstat (limited to 'test/lisp/progmodes')
-rw-r--r-- | test/lisp/progmodes/csharp-mode-resources/indent.erts | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/test/lisp/progmodes/csharp-mode-resources/indent.erts b/test/lisp/progmodes/csharp-mode-resources/indent.erts index a676ecc9728..e03ba80d709 100644 --- a/test/lisp/progmodes/csharp-mode-resources/indent.erts +++ b/test/lisp/progmodes/csharp-mode-resources/indent.erts @@ -16,4 +16,82 @@ public class Foo { } // [2] } } + +public class Foo { + void Bar () { + var x = new X(); + for (;;) { + x(); + } // [2] + } +} + +public class Foo { + void Bar () { + var x = new X() + { + var b = 3; + }; + for (;;) { + x(); + } // [2] + } +} + +public class Foo { + void Bar () { + var x = new X() // Hello + { + var b = 3; + }; + for (;;) { + x(); + } // [2] + } +} + +public class Foo { + void Bar () { + var x = new X() // Hello ; + { + var b = 3; + }; + for (;;) { + x(); + } // [2] + } +} + +public class Foo { + void Bar () { + var x = new X // Hello ; + { + var b = 3; + }; + for (;;) { + x(); + } // [2] + } +} + +public class Foo { + void Bar () { + var x = new X(); // Hello ; + for (;;) { + x(); + } // [2] + } +} + +public class Foo +{ + void Bar () + { + var x = new X(); // Hello ; + for (;;) + { + x(); + } // [2] + } +} =-=-= |