@@ -25,7 +25,7 @@ import {
2525 openingParenthesis ,
2626} from './literals.js'
2727import { optionallySurroundedByParentheses } from './parentheses.js'
28- import { trivia } from './trivia.js'
28+ import { optionalTrivia , trivia } from './trivia.js'
2929
3030export type Molecule = { readonly [ key : Atom ] : Molecule | Atom }
3131
@@ -52,7 +52,7 @@ const propertyValue = oneOf([
5252] )
5353
5454const namedProperty = map (
55- sequence ( [ propertyKey , colon , optional ( trivia ) , propertyValue ] ) ,
55+ sequence ( [ propertyKey , colon , optionalTrivia , propertyValue ] ) ,
5656 ( [ key , _colon , _trivia , value ] ) => [ key , value ] as const ,
5757)
5858
@@ -65,16 +65,16 @@ const property = (index: Indexer) =>
6565 )
6666
6767const propertyDelimiter = oneOf ( [
68- sequence ( [ optional ( trivia ) , comma , optional ( trivia ) ] ) ,
68+ sequence ( [ optionalTrivia , comma , optionalTrivia ] ) ,
6969 trivia ,
7070] )
7171
7272const argument = map (
7373 sequence ( [
7474 openingParenthesis ,
75- optional ( trivia ) ,
75+ optionalTrivia ,
7676 propertyValue ,
77- optional ( trivia ) ,
77+ optionalTrivia ,
7878 closingParenthesis ,
7979 ] ) ,
8080 ( [ _openingParenthesis , _trivia1 , argument , _trivia2 , _closingParenthesis ] ) =>
@@ -83,9 +83,9 @@ const argument = map(
8383
8484const dottedKeyPathComponent = map (
8585 sequence ( [
86- optional ( trivia ) ,
86+ optionalTrivia ,
8787 dot ,
88- optional ( trivia ) ,
88+ optionalTrivia ,
8989 atomWithAdditionalQuotationRequirements ( dot ) ,
9090 ] ) ,
9191 ( [ _trivia1 , _dot , _trivia2 , key ] ) => key ,
0 commit comments