@@ -54,20 +54,22 @@ export const regExpToken = (regExp, transform = String) => node => {
54
54
return value
55
55
}
56
56
57
- export const tokens = {
58
- SPACE : noopToken ( node => node . type === 'space' ) ,
59
- SLASH : noopToken ( node => node . type === 'div' && node . value === '/' ) ,
60
- COMMA : noopToken ( node => node . type === 'div' && node . value === ',' ) ,
61
- WORD : valueForTypeToken ( 'word' ) ,
62
- NONE : regExpToken ( noneRe ) ,
63
- AUTO : regExpToken ( autoRe ) ,
64
- NUMBER : regExpToken ( numberRe , Number ) ,
65
- LENGTH : regExpToken ( lengthRe , Number ) ,
66
- UNSUPPORTED_LENGTH_UNIT : regExpToken ( unsupportedUnitRe ) ,
67
- ANGLE : regExpToken ( angleRe ) ,
68
- PERCENT : regExpToken ( percentRe ) ,
69
- IDENT : regExpToken ( identRe ) ,
70
- STRING : matchString ,
71
- COLOR : matchColor ,
72
- LINE : regExpToken ( / ^ ( n o n e | u n d e r l i n e | l i n e - t h r o u g h ) $ / i) ,
73
- }
57
+ export const SPACE = noopToken ( node => node . type === 'space' )
58
+ export const SLASH = noopToken (
59
+ node => node . type === 'div' && node . value === '/'
60
+ )
61
+ export const COMMA = noopToken (
62
+ node => node . type === 'div' && node . value === ','
63
+ )
64
+ export const WORD = valueForTypeToken ( 'word' )
65
+ export const NONE = regExpToken ( noneRe )
66
+ export const AUTO = regExpToken ( autoRe )
67
+ export const NUMBER = regExpToken ( numberRe , Number )
68
+ export const LENGTH = regExpToken ( lengthRe , Number )
69
+ export const UNSUPPORTED_LENGTH_UNIT = regExpToken ( unsupportedUnitRe )
70
+ export const ANGLE = regExpToken ( angleRe )
71
+ export const PERCENT = regExpToken ( percentRe )
72
+ export const IDENT = regExpToken ( identRe )
73
+ export const STRING = matchString
74
+ export const COLOR = matchColor
75
+ export const LINE = regExpToken ( / ^ ( n o n e | u n d e r l i n e | l i n e - t h r o u g h ) $ / i)
0 commit comments