File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
glass-easel-template-compiler/src/parse Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -500,6 +500,7 @@ pub enum ParseErrorKind {
500500 ShouldQuoted ,
501501 EmptyExpression ,
502502 InvalidEndTag ,
503+ DeprecatedAttribute ,
503504}
504505
505506impl ParseErrorKind {
@@ -536,6 +537,7 @@ impl ParseErrorKind {
536537 Self :: ShouldQuoted => "should be quoted" ,
537538 Self :: EmptyExpression => "the expression is empty" ,
538539 Self :: InvalidEndTag => "invalid end tag" ,
540+ Self :: DeprecatedAttribute => "this attribute is deprecated" ,
539541 }
540542 }
541543
@@ -572,6 +574,7 @@ impl ParseErrorKind {
572574 Self :: ShouldQuoted => ParseErrorLevel :: Warn ,
573575 Self :: EmptyExpression => ParseErrorLevel :: Warn ,
574576 Self :: InvalidEndTag => ParseErrorLevel :: Warn ,
577+ Self :: DeprecatedAttribute => ParseErrorLevel :: Warn ,
575578 }
576579 }
577580}
Original file line number Diff line number Diff line change @@ -807,6 +807,10 @@ impl Element {
807807 "for" => AttrPrefixKind :: WxFor ( x. location ( ) ) ,
808808 "for-index" => AttrPrefixKind :: WxForIndex ( x. location ( ) ) ,
809809 "for-item" => AttrPrefixKind :: WxForItem ( x. location ( ) ) ,
810+ "for-items" => {
811+ ps. add_warning ( ParseErrorKind :: DeprecatedAttribute , x. location ( ) ) ;
812+ AttrPrefixKind :: WxFor ( x. location ( ) )
813+ } ,
810814 "key" => AttrPrefixKind :: WxKey ( x. location ( ) ) ,
811815 _ => AttrPrefixKind :: Invalid ( segs. first ( ) . unwrap ( ) . location ( ) ) ,
812816 } ,
You can’t perform that action at this time.
0 commit comments