Browse Source

Runn prettier

master
Dylan Baker 5 years ago
parent
commit
802884b135
2 changed files with 6 additions and 3 deletions
  1. 0
    1
      src/compiler.js
  2. 6
    2
      src/parser.js

+ 0
- 1
src/compiler.js View File

@@ -47,7 +47,6 @@ module.exports = class Compiler {
47 47
         if (!selfClosingTags.includes(node.functionName)) {
48 48
           this.result += `</${node.functionName}>`
49 49
         }
50
-
51 50
       } else if (node.type === 'string') {
52 51
         this.result += node.content
53 52
       } else if (node.type === 'identifier') {

+ 6
- 2
src/parser.js View File

@@ -40,10 +40,14 @@ module.exports = class Parser {
40 40
       type: 'functionCall',
41 41
       args: [],
42 42
       subtree: [],
43
-      functionName: this.tokenStream.eat(tokenTypes.LITERAL).value
43
+      functionName: this.tokenStream.eat(tokenTypes.LITERAL).value,
44 44
     })
45 45
 
46
-    while (![tokenTypes.CPAREN, tokenTypes.EOF].includes(this.tokenStream.peek().type)) {
46
+    while (
47
+      ![tokenTypes.CPAREN, tokenTypes.EOF].includes(
48
+        this.tokenStream.peek().type,
49
+      )
50
+    ) {
47 51
       if (this.tokenStream.peek().type === tokenTypes.ATTRIBUTE) {
48 52
         elementNode.args.push(this.attribute())
49 53
       } else if (this.tokenStream.peek().type === tokenTypes.QUOTE) {

Loading…
Cancel
Save