File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -495,6 +495,8 @@ impl<'source> ParsingContext<'source> {
495
495
| TokenValue :: Bang
496
496
| TokenValue :: Tilde
497
497
| TokenValue :: LeftParen
498
+ | TokenValue :: Increment
499
+ | TokenValue :: Decrement
498
500
| TokenValue :: Identifier ( _)
499
501
| TokenValue :: TypeName ( _)
500
502
| TokenValue :: IntConstant ( _)
Original file line number Diff line number Diff line change @@ -778,9 +778,10 @@ fn swizzles() {
778
778
}
779
779
780
780
#[ test]
781
- fn vector_indexing ( ) {
781
+ fn expressions ( ) {
782
782
let mut parser = Parser :: default ( ) ;
783
783
784
+ // Vector indexing
784
785
parser
785
786
. parse (
786
787
& Options :: from ( ShaderStage :: Vertex ) ,
@@ -795,4 +796,20 @@ fn vector_indexing() {
795
796
"# ,
796
797
)
797
798
. unwrap ( ) ;
799
+
800
+ // Prefix increment/decrement
801
+ parser
802
+ . parse (
803
+ & Options :: from ( ShaderStage :: Vertex ) ,
804
+ r#"
805
+ # version 450
806
+ void main() {
807
+ uint index = 0;
808
+
809
+ --index;
810
+ ++index;
811
+ }
812
+ "# ,
813
+ )
814
+ . unwrap ( ) ;
798
815
}
You can’t perform that action at this time.
0 commit comments