Skip to main content
Create new
Introduction
Reactivity
Props
Logic
Events
Bindings
Lifecycle
Stores
Motion
Transitions
Animations
Easing
SVG
Actions
Classes
Component composition
Context API
Special elements
Module context
Debugging
7GUIs
Miscellaneous
App.svelte
<script>
let c = $state(0);
let f = $state(32);

function setBothFromC(value) {
c = +value;
f = +(32 + (9 / 5) * c).toFixed(1);
}

function setBothFromF(value) {
f = +value;
c = +((5 / 9) * (f - 32)).toFixed(1);
}
</script>

<!-- https://eugenkiss.github.io/7guis/tasks/#temp -->
<input value={c} oninput={(e) => setBothFromC(e.target.value)} type="number" /> °C =
<input value={f} oninput={(e) => setBothFromF(e.target.value)} type="number" /> °F

<style>
input {
width: 5em;
}
</style>

Error compiling component

WebAssembly.instantiateStreaming(): value type opcode @+13
import 'svelte/internal/disclose-version';
import * as $ from 'svelte/internal/client';

var on_input = (e, setBothFromC) => setBothFromC(e.target.value);
var on_input_1 = (e, setBothFromF) => setBothFromF(e.target.value);
var root = $.template(`<input type="number" class="svelte-1lbvfyv"> °C = <input type="number" class="svelte-1lbvfyv"> °F`, 1);

export default function App($$anchor, $$props) {
$.push($$props, true);

let c = $.state(0);
let f = $.state(32);

function setBothFromC(value) {
$.set(c, +value);
$.set(f, +(32 + 9 / 5 * $.get(c)).toFixed(1));
}

function setBothFromF(value) {
$.set(f, +value);
$.set(c, +(5 / 9 * ($.get(f) - 32)).toFixed(1));
}

var fragment = root();
var input = $.first_child(fragment);

$.remove_input_defaults(input);
input.__input = [on_input, setBothFromC];

var input_1 = $.sibling(input, 2);

$.remove_input_defaults(input_1);
input_1.__input = [on_input_1, setBothFromF];
$.next();

$.template_effect(() => {
result = svelte.compile(source, {
generate: ,
});

input.svelte-1lbvfyv {
width: 5em;
}

		
			
				
  • Root {
    • css: StyleSheet {...}
      • type: "StyleSheet"
      • start: 463
      • end: 505
      • attributes: []
      • children: [...] (1)
        • Rule {...}
          • type: "Rule"
          • prelude: SelectorList {...}
            • type: "SelectorList"
            • start: 472
            • end: 477
            • children: [...] (1)
              • ComplexSelector {...}
                • type: "ComplexSelector"
                • start: 472
                • end: 477
                • children: [...] (1)
                  • RelativeSelector {...}
                    • type: "RelativeSelector"
                    • combinator: null
                    • selectors: [...] (1)
                      • TypeSelector {...}
                        • type: "TypeSelector"
                        • name: "input"
                        • start: 472
                        • end: 477
                        }
                      ]
                    • start: 472
                    • end: 477
                    }
                  ]
                }
              ]
            }
          • block: Block {...}
            • type: "Block"
            • start: 478
            • end: 496
            • children: [...] (1)
              • Declaration {...}
                • type: "Declaration"
                • start: 482
                • end: 492
                • property: "width"
                • value: "5em"
                }
              ]
            }
          • start: 472
          • end: 496
          }
        ]
      • content: {...}
        • start: 470
        • end: 497
        • styles: "\n\tinput {\n\t\twidth: 5em;\n\t}\n"
        • comment: null
        }
      }
    • js: []
    • start: 239
    • end: 461
    • type: "Root"
    • fragment: Fragment {...}
      • type: "Fragment"
      • nodes: [...] (7)
        • Text {...}
          • type: "Text"
          • start: 237
          • end: 239
          • raw: "\n\n"
          • data: "\n\n"
          }
        • Comment {...}
          • type: "Comment"
          • start: 239
          • end: 293
          • data: " https://eugenkiss.github.io/7guis/tasks/#temp "
          }
        • Text {...}
          • type: "Text"
          • start: 293
          • end: 294
          • raw: "\n"
          • data: "\n"
          }
        • RegularElement {...}
          • type: "RegularElement"
          • start: 294
          • end: 373
          • name: "input"
          • attributes: [...] (4)
            • Attribute {...}
              • type: "Attribute"
              • start: 301
              • end: 310
              • name: "value"
              • value: ExpressionTag {...}
                • type: "ExpressionTag"
                • start: 307
                • end: 310
                • expression: Identifier {...}
                  • type: "Identifier"
                  • start: 308
                  • end: 309
                  • loc: {...}
                    • start: {...}
                      • line: 17
                      • column: 14
                      }
                    • end: {...}
                      • line: 17
                      • column: 15
                      }
                    }
                  • name: "c"
                  }
                }
              }
            • Attribute {...}
              • type: "Attribute"
              • start: 311
              • end: 356
              • name: "oninput"
              • value: ExpressionTag {...}
                • type: "ExpressionTag"
                • start: 319
                • end: 356
                • expression: ArrowFunctionExpression {...}
                  • type: "ArrowFunctionExpression"
                  • start: 320
                  • end: 355
                  • loc: {...}
                    • start: {...}
                      • line: 17
                      • column: 26
                      }
                    • end: {...}
                      • line: 17
                      • column: 61
                      }
                    }
                  • id: null
                  • expression: true
                  • generator: false
                  • async: false
                  • params: [...] (1)
                    • Identifier {...}
                      • type: "Identifier"
                      • start: 321
                      • end: 322
                      • loc: {...}
                        • start: {...}
                          • line: 17
                          • column: 27
                          }
                        • end: {...}
                          • line: 17
                          • column: 28
                          }
                        }
                      • name: "e"
                      }
                    ]
                  • body: CallExpression {...}
                    • type: "CallExpression"
                    • start: 327
                    • end: 355
                    • loc: {...}
                      • start: {...}
                        • line: 17
                        • column: 33
                        }
                      • end: {...}
                        • line: 17
                        • column: 61
                        }
                      }
                    • callee: Identifier {...}
                      • type: "Identifier"
                      • start: 327
                      • end: 339
                      • loc: {...}
                        • start: {...}
                          • line: 17
                          • column: 33
                          }
                        • end: {...}
                          • line: 17
                          • column: 45
                          }
                        }
                      • name: "setBothFromC"
                      }
                    • arguments: [...] (1)
                      • MemberExpression {...}
                        • type: "MemberExpression"
                        • start: 340
                        • end: 354
                        • loc: {...}
                          • start: {...}
                            • line: 17
                            • column: 46
                            }
                          • end: {...}
                            • line: 17
                            • column: 60
                            }
                          }
                        • object: MemberExpression {...}
                          • type: "MemberExpression"
                          • start: 340
                          • end: 348
                          • loc: {...}
                            • start: {...}
                              • line: 17
                              • column: 46
                              }
                            • end: {...}
                              • line: 17
                              • column: 54
                              }
                            }
                          • object: Identifier {...}
                            • type: "Identifier"
                            • start: 340
                            • end: 341
                            • loc: {...}
                              • start: {...}
                                • line: 17
                                • column: 46
                                }
                              • end: {...}
                                • line: 17
                                • column: 47
                                }
                              }
                            • name: "e"
                            }
                          • property: Identifier {...}
                            • type: "Identifier"
                            • start: 342
                            • end: 348
                            • loc: {...}
                              • start: {...}
                                • line: 17
                                • column: 48
                                }
                              • end: {...}
                                • line: 17
                                • column: 54
                                }
                              }
                            • name: "target"
                            }
                          • computed: false
                          • optional: false
                          }
                        • property: Identifier {...}
                          • type: "Identifier"
                          • start: 349
                          • end: 354
                          • loc: {...}
                            • start: {...}
                              • line: 17
                              • column: 55
                              }
                            • end: {...}
                              • line: 17
                              • column: 60
                              }
                            }
                          • name: "value"
                          }
                        • computed: false
                        • optional: false
                        }
                      ]
                    • optional: false
                    }
                  }
                }
              }
            • Attribute {...}
              • type: "Attribute"
              • start: 357
              • end: 370
              • name: "type"
              • value: [...] (1)
                • Text {...}
                  • start: 363
                  • end: 369
                  • type: "Text"
                  • raw: "number"
                  • data: "number"
                  }
                ]
              }
            • Attribute {...}
              • type: "Attribute"
              • start: -1
              • end: -1
              • name: "class"
              • value: [...] (1)
                • Text {...}
                  • type: "Text"
                  • data: "svelte-1lbvfyv"
                  • raw: "svelte-1lbvfyv"
                  • start: -1
                  • end: -1
                  }
                ]
              }
            ]
          • fragment: Fragment {...}
            • type: "Fragment"
            • nodes: []
            }
          }
        • Text {...}
          • type: "Text"
          • start: 373
          • end: 379
          • raw: " °C = "
          • data: " °C = "
          }
        • RegularElement {...}
          • type: "RegularElement"
          • start: 379
          • end: 458
          • name: "input"
          • attributes: [...] (4)
            • Attribute {...}
              • type: "Attribute"
              • start: 386
              • end: 395
              • name: "value"
              • value: ExpressionTag {...}
                • type: "ExpressionTag"
                • start: 392
                • end: 395
                • expression: Identifier {...}
                  • type: "Identifier"
                  • start: 393
                  • end: 394
                  • loc: {...}
                    • start: {...}
                      • line: 18
                      • column: 14
                      }
                    • end: {...}
                      • line: 18
                      • column: 15
                      }
                    }
                  • name: "f"
                  }
                }
              }
            • Attribute {...}
              • type: "Attribute"
              • start: 396
              • end: 441
              • name: "oninput"
              • value: ExpressionTag {...}
                • type: "ExpressionTag"
                • start: 404
                • end: 441
                • expression: ArrowFunctionExpression {...}
                  • type: "ArrowFunctionExpression"
                  • start: 405
                  • end: 440
                  • loc: {...}
                    • start: {...}
                      • line: 18
                      • column: 26
                      }
                    • end: {...}
                      • line: 18
                      • column: 61
                      }
                    }
                  • id: null
                  • expression: true
                  • generator: false
                  • async: false
                  • params: [...] (1)
                    • Identifier {...}
                      • type: "Identifier"
                      • start: 406
                      • end: 407
                      • loc: {...}
                        • start: {...}
                          • line: 18
                          • column: 27
                          }
                        • end: {...}
                          • line: 18
                          • column: 28
                          }
                        }
                      • name: "e"
                      }
                    ]
                  • body: CallExpression {...}
                    • type: "CallExpression"
                    • start: 412
                    • end: 440
                    • loc: {...}
                      • start: {...}
                        • line: 18
                        • column: 33
                        }
                      • end: {...}
                        • line: 18
                        • column: 61
                        }
                      }
                    • callee: Identifier {...}
                      • type: "Identifier"
                      • start: 412
                      • end: 424
                      • loc: {...}
                        • start: {...}
                          • line: 18
                          • column: 33
                          }
                        • end: {...}
                          • line: 18
                          • column: 45
                          }
                        }
                      • name: "setBothFromF"
                      }
                    • arguments: [...] (1)
                      • MemberExpression {...}
                        • type: "MemberExpression"
                        • start: 425
                        • end: 439
                        • loc: {...}
                          • start: {...}
                            • line: 18
                            • column: 46
                            }
                          • end: {...}
                            • line: 18
                            • column: 60
                            }
                          }
                        • object: MemberExpression {...}
                          • type: "MemberExpression"
                          • start: 425
                          • end: 433
                          • loc: {...}
                            • start: {...}
                              • line: 18
                              • column: 46
                              }
                            • end: {...}
                              • line: 18
                              • column: 54
                              }
                            }
                          • object: Identifier {...}
                            • type: "Identifier"
                            • start: 425
                            • end: 426
                            • loc: {...}
                              • start: {...}
                                • line: 18
                                • column: 46
                                }
                              • end: {...}
                                • line: 18
                                • column: 47
                                }
                              }
                            • name: "e"
                            }
                          • property: Identifier {...}
                            • type: "Identifier"
                            • start: 427
                            • end: 433
                            • loc: {...}
                              • start: {...}
                                • line: 18
                                • column: 48
                                }
                              • end: {...}
                                • line: 18
                                • column: 54
                                }
                              }
                            • name: "target"
                            }
                          • computed: false
                          • optional: false
                          }
                        • property: Identifier {...}
                          • type: "Identifier"
                          • start: 434
                          • end: 439
                          • loc: {...}
                            • start: {...}
                              • line: 18
                              • column: 55
                              }
                            • end: {...}
                              • line: 18
                              • column: 60
                              }
                            }
                          • name: "value"
                          }
                        • computed: false
                        • optional: false
                        }
                      ]
                    • optional: false
                    }
                  }
                }
              }
            • Attribute {...}
              • type: "Attribute"
              • start: 442
              • end: 455
              • name: "type"
              • value: [...] (1)
                • Text {...}
                  • start: 448
                  • end: 454
                  • type: "Text"
                  • raw: "number"
                  • data: "number"
                  }
                ]
              }
            • Attribute {...}
              • type: "Attribute"
              • start: -1
              • end: -1
              • name: "class"
              • value: [...] (1)
                • Text {...}
                  • type: "Text"
                  • data: "svelte-1lbvfyv"
                  • raw: "svelte-1lbvfyv"
                  • start: -1
                  • end: -1
                  }
                ]
              }
            ]
          • fragment: Fragment {...}
            • type: "Fragment"
            • nodes: []
            }
          }
        • Text {...}
          • type: "Text"
          • start: 458
          • end: 463
          • raw: " °F"
          • data: " °F"
          }
        ]
      }
    • options: null
    • instance: Script {...}
      • type: "Script"
      • start: 0
      • end: 237
      • context: "default"
      • content: Program {...}
        • type: "Program"
        • start: 8
        • end: 228
        • loc: {...}
          • start: {...}
            • line: 1
            • column: 0
            }
          • end: {...}
            • line: 14
            • column: 0
            }
          }
        • body: [...] (4)
          • VariableDeclaration {...}
            • type: "VariableDeclaration"
            • start: 10
            • end: 28
            • loc: {...}
              • start: {...}
                • line: 2
                • column: 1
                }
              • end: {...}
                • line: 2
                • column: 19
                }
              }
            • declarations: [...] (1)
              • VariableDeclarator {...}
                • type: "VariableDeclarator"
                • start: 14
                • end: 27
                • loc: {...}
                  • start: {...}
                    • line: 2
                    • column: 5
                    }
                  • end: {...}
                    • line: 2
                    • column: 18
                    }
                  }
                • id: Identifier {...}
                  • type: "Identifier"
                  • start: 14
                  • end: 15
                  • loc: {...}
                    • start: {...}
                      • line: 2
                      • column: 5
                      }
                    • end: {...}
                      • line: 2
                      • column: 6
                      }
                    }
                  • name: "c"
                  }
                • init: CallExpression {...}
                  • type: "CallExpression"
                  • start: 18
                  • end: 27
                  • loc: {...}
                    • start: {...}
                      • line: 2
                      • column: 9
                      }
                    • end: {...}
                      • line: 2
                      • column: 18
                      }
                    }
                  • callee: Identifier {...}
                    • type: "Identifier"
                    • start: 18
                    • end: 24
                    • loc: {...}
                      • start: {...}
                        • line: 2
                        • column: 9
                        }
                      • end: {...}
                        • line: 2
                        • column: 15
                        }
                      }
                    • name: "$state"
                    }
                  • arguments: [...] (1)
                    • Literal {...}
                      • type: "Literal"
                      • start: 25
                      • end: 26
                      • loc: {...}
                        • start: {...}
                          • line: 2
                          • column: 16
                          }
                        • end: {...}
                          • line: 2
                          • column: 17
                          }
                        }
                      • value: 0
                      • raw: "0"
                      }
                    ]
                  • optional: false
                  }
                }
              ]
            • kind: "let"
            }
          • VariableDeclaration {...}
            • type: "VariableDeclaration"
            • start: 30
            • end: 49
            • loc: {...}
              • start: {...}
                • line: 3
                • column: 1
                }
              • end: {...}
                • line: 3
                • column: 20
                }
              }
            • declarations: [...] (1)
              • VariableDeclarator {...}
                • type: "VariableDeclarator"
                • start: 34
                • end: 48
                • loc: {...}
                  • start: {...}
                    • line: 3
                    • column: 5
                    }
                  • end: {...}
                    • line: 3
                    • column: 19
                    }
                  }
                • id: Identifier {...}
                  • type: "Identifier"
                  • start: 34
                  • end: 35
                  • loc: {...}
                    • start: {...}
                      • line: 3
                      • column: 5
                      }
                    • end: {...}
                      • line: 3
                      • column: 6
                      }
                    }
                  • name: "f"
                  }
                • init: CallExpression {...}
                  • type: "CallExpression"
                  • start: 38
                  • end: 48
                  • loc: {...}
                    • start: {...}
                      • line: 3
                      • column: 9
                      }
                    • end: {...}
                      • line: 3
                      • column: 19
                      }
                    }
                  • callee: Identifier {...}
                    • type: "Identifier"
                    • start: 38
                    • end: 44
                    • loc: {...}
                      • start: {...}
                        • line: 3
                        • column: 9
                        }
                      • end: {...}
                        • line: 3
                        • column: 15
                        }
                      }
                    • name: "$state"
                    }
                  • arguments: [...] (1)
                    • Literal {...}
                      • type: "Literal"
                      • start: 45
                      • end: 47
                      • loc: {...}
                        • start: {...}
                          • line: 3
                          • column: 16
                          }
                        • end: {...}
                          • line: 3
                          • column: 18
                          }
                        }
                      • value: 32
                      • raw: "32"
                      }
                    ]
                  • optional: false
                  }
                }
              ]
            • kind: "let"
            }
          • FunctionDeclaration {...}
            • type: "FunctionDeclaration"
            • start: 52
            • end: 137
            • loc: {...}
              • start: {...}
                • line: 5
                • column: 1
                }
              • end: {...}
                • line: 8
                • column: 2
                }
              }
            • id: Identifier {...}
              • type: "Identifier"
              • start: 61
              • end: 73
              • loc: {...}
                • start: {...}
                  • line: 5
                  • column: 10
                  }
                • end: {...}
                  • line: 5
                  • column: 22
                  }
                }
              • name: "setBothFromC"
              }
            • expression: false
            • generator: false
            • async: false
            • params: [...] (1)
              • Identifier {...}
                • type: "Identifier"
                • start: 74
                • end: 79
                • loc: {...}
                  • start: {...}
                    • line: 5
                    • column: 23
                    }
                  • end: {...}
                    • line: 5
                    • column: 28
                    }
                  }
                • name: "value"
                }
              ]
            • body: BlockStatement {...}
              • type: "BlockStatement"
              • start: 81
              • end: 137
              • loc: {...}
                • start: {...}
                  • line: 5
                  • column: 30
                  }
                • end: {...}
                  • line: 8
                  • column: 2
                  }
                }
              • body: [...] (2)
                • ExpressionStatement {...}
                  • type: "ExpressionStatement"
                  • start: 85
                  • end: 96
                  • loc: {...}
                    • start: {...}
                      • line: 6
                      • column: 2
                      }
                    • end: {...}
                      • line: 6
                      • column: 13
                      }
                    }
                  • expression: AssignmentExpression {...}
                    • type: "AssignmentExpression"
                    • start: 85
                    • end: 95
                    • loc: {...}
                      • start: {...}
                        • line: 6
                        • column: 2
                        }
                      • end: {...}
                        • line: 6
                        • column: 12
                        }
                      }
                    • operator: "="
                    • left: Identifier {...}
                      • type: "Identifier"
                      • start: 85
                      • end: 86
                      • loc: {...}
                        • start: {...}
                          • line: 6
                          • column: 2
                          }
                        • end: {...}
                          • line: 6
                          • column: 3
                          }
                        }
                      • name: "c"
                      }
                    • right: UnaryExpression {...}
                      • type: "UnaryExpression"
                      • start: 89
                      • end: 95
                      • loc: {...}
                        • start: {...}
                          • line: 6
                          • column: 6
                          }
                        • end: {...}
                          • line: 6
                          • column: 12
                          }
                        }
                      • operator: "+"
                      • prefix: true
                      • argument: Identifier {...}
                        • type: "Identifier"
                        • start: 90
                        • end: 95
                        • loc: {...}
                          • start: {...}
                            • line: 6
                            • column: 7
                            }
                          • end: {...}
                            • line: 6
                            • column: 12
                            }
                          }
                        • name: "value"
                        }
                      }
                    }
                  }
                • ExpressionStatement {...}
                  • type: "ExpressionStatement"
                  • start: 99
                  • end: 134
                  • loc: {...}
                    • start: {...}
                      • line: 7
                      • column: 2
                      }
                    • end: {...}
                      • line: 7
                      • column: 37
                      }
                    }
                  • expression: AssignmentExpression {...}
                    • type: "AssignmentExpression"
                    • start: 99
                    • end: 133
                    • loc: {...}
                      • start: {...}
                        • line: 7
                        • column: 2
                        }
                      • end: {...}
                        • line: 7
                        • column: 36
                        }
                      }
                    • operator: "="
                    • left: Identifier {...}
                      • type: "Identifier"
                      • start: 99
                      • end: 100
                      • loc: {...}
                        • start: {...}
                          • line: 7
                          • column: 2
                          }
                        • end: {...}
                          • line: 7
                          • column: 3
                          }
                        }
                      • name: "f"
                      }
                    • right: UnaryExpression {...}
                      • type: "UnaryExpression"
                      • start: 103
                      • end: 133
                      • loc: {...}
                        • start: {...}
                          • line: 7
                          • column: 6
                          }
                        • end: {...}
                          • line: 7
                          • column: 36
                          }
                        }
                      • operator: "+"
                      • prefix: true
                      • argument: CallExpression {...}
                        • type: "CallExpression"
                        • start: 104
                        • end: 133
                        • loc: {...}
                          • start: {...}
                            • line: 7
                            • column: 7
                            }
                          • end: {...}
                            • line: 7
                            • column: 36
                            }
                          }
                        • callee: MemberExpression {...}
                          • type: "MemberExpression"
                          • start: 104
                          • end: 130
                          • loc: {...}
                            • start: {...}
                              • line: 7
                              • column: 7
                              }
                            • end: {...}
                              • line: 7
                              • column: 33
                              }
                            }
                          • object: BinaryExpression {...}
                            • type: "BinaryExpression"
                            • start: 105
                            • end: 121
                            • loc: {...}
                              • start: {...}
                                • line: 7
                                • column: 8
                                }
                              • end: {...}
                                • line: 7
                                • column: 24
                                }
                              }
                            • left: Literal {...}
                              • type: "Literal"
                              • start: 105
                              • end: 107
                              • loc: {...}
                                • start: {...}
                                  • line: 7
                                  • column: 8
                                  }
                                • end: {...}
                                  • line: 7
                                  • column: 10
                                  }
                                }
                              • value: 32
                              • raw: "32"
                              }
                            • operator: "+"
                            • right: BinaryExpression {...}
                              • type: "BinaryExpression"
                              • start: 110
                              • end: 121
                              • loc: {...}
                                • start: {...}
                                  • line: 7
                                  • column: 13
                                  }
                                • end: {...}
                                  • line: 7
                                  • column: 24
                                  }
                                }
                              • left: BinaryExpression {...}
                                • type: "BinaryExpression"
                                • start: 111
                                • end: 116
                                • loc: {...}
                                  • start: {...}
                                    • line: 7
                                    • column: 14
                                    }
                                  • end: {...}
                                    • line: 7
                                    • column: 19
                                    }
                                  }
                                • left: Literal {...}
                                  • type: "Literal"
                                  • start: 111
                                  • end: 112
                                  • loc: {...}
                                    • start: {...}
                                      • line: 7
                                      • column: 14
                                      }
                                    • end: {...}
                                      • line: 7
                                      • column: 15
                                      }
                                    }
                                  • value: 9
                                  • raw: "9"
                                  }
                                • operator: "/"
                                • right: Literal {...}
                                  • type: "Literal"
                                  • start: 115
                                  • end: 116
                                  • loc: {...}
                                    • start: {...}
                                      • line: 7
                                      • column: 18
                                      }
                                    • end: {...}
                                      • line: 7
                                      • column: 19
                                      }
                                    }
                                  • value: 5
                                  • raw: "5"
                                  }
                                }
                              • operator: "*"
                              • right: Identifier {...}
                                • type: "Identifier"
                                • start: 120
                                • end: 121
                                • loc: {...}
                                  • start: {...}
                                    • line: 7
                                    • column: 23
                                    }
                                  • end: {...}
                                    • line: 7
                                    • column: 24
                                    }
                                  }
                                • name: "c"
                                }
                              }
                            }
                          • property: Identifier {...}
                            • type: "Identifier"
                            • start: 123
                            • end: 130
                            • loc: {...}
                              • start: {...}
                                • line: 7
                                • column: 26
                                }
                              • end: {...}
                                • line: 7
                                • column: 33
                                }
                              }
                            • name: "toFixed"
                            }
                          • computed: false
                          • optional: false
                          }
                        • arguments: [...] (1)
                          • Literal {...}
                            • type: "Literal"
                            • start: 131
                            • end: 132
                            • loc: {...}
                              • start: {...}
                                • line: 7
                                • column: 34
                                }
                              • end: {...}
                                • line: 7
                                • column: 35
                                }
                              }
                            • value: 1
                            • raw: "1"
                            }
                          ]
                        • optional: false
                        }
                      }
                    }
                  }
                ]
              }
            }
          • FunctionDeclaration {...}
            • type: "FunctionDeclaration"
            • start: 140
            • end: 227
            • loc: {...}
              • start: {...}
                • line: 10
                • column: 1
                }
              • end: {...}
                • line: 13
                • column: 2
                }
              }
            • id: Identifier {...}
              • type: "Identifier"
              • start: 149
              • end: 161
              • loc: {...}
                • start: {...}
                  • line: 10
                  • column: 10
                  }
                • end: {...}
                  • line: 10
                  • column: 22
                  }
                }
              • name: "setBothFromF"
              }
            • expression: false
            • generator: false
            • async: false
            • params: [...] (1)
              • Identifier {...}
                • type: "Identifier"
                • start: 162
                • end: 167
                • loc: {...}
                  • start: {...}
                    • line: 10
                    • column: 23
                    }
                  • end: {...}
                    • line: 10
                    • column: 28
                    }
                  }
                • name: "value"
                }
              ]
            • body: BlockStatement {...}
              • type: "BlockStatement"
              • start: 169
              • end: 227
              • loc: {...}
                • start: {...}
                  • line: 10
                  • column: 30
                  }
                • end: {...}
                  • line: 13
                  • column: 2
                  }
                }
              • body: [...] (2)
                • ExpressionStatement {...}
                  • type: "ExpressionStatement"
                  • start: 173
                  • end: 184
                  • loc: {...}
                    • start: {...}
                      • line: 11
                      • column: 2
                      }
                    • end: {...}
                      • line: 11
                      • column: 13
                      }
                    }
                  • expression: AssignmentExpression {...}
                    • type: "AssignmentExpression"
                    • start: 173
                    • end: 183
                    • loc: {...}
                      • start: {...}
                        • line: 11
                        • column: 2
                        }
                      • end: {...}
                        • line: 11
                        • column: 12
                        }
                      }
                    • operator: "="
                    • left: Identifier {...}
                      • type: "Identifier"
                      • start: 173
                      • end: 174
                      • loc: {...}
                        • start: {...}
                          • line: 11
                          • column: 2
                          }
                        • end: {...}
                          • line: 11
                          • column: 3
                          }
                        }
                      • name: "f"
                      }
                    • right: UnaryExpression {...}
                      • type: "UnaryExpression"
                      • start: 177
                      • end: 183
                      • loc: {...}
                        • start: {...}
                          • line: 11
                          • column: 6
                          }
                        • end: {...}
                          • line: 11
                          • column: 12
                          }
                        }
                      • operator: "+"
                      • prefix: true
                      • argument: Identifier {...}
                        • type: "Identifier"
                        • start: 178
                        • end: 183
                        • loc: {...}
                          • start: {...}
                            • line: 11
                            • column: 7
                            }
                          • end: {...}
                            • line: 11
                            • column: 12
                            }
                          }
                        • name: "value"
                        }
                      }
                    }
                  }
                • ExpressionStatement {...}
                  • type: "ExpressionStatement"
                  • start: 187
                  • end: 224
                  • loc: {...}
                    • start: {...}
                      • line: 12
                      • column: 2
                      }
                    • end: {...}
                      • line: 12
                      • column: 39
                      }
                    }
                  • expression: AssignmentExpression {...}
                    • type: "AssignmentExpression"
                    • start: 187
                    • end: 223
                    • loc: {...}
                      • start: {...}
                        • line: 12
                        • column: 2
                        }
                      • end: {...}
                        • line: 12
                        • column: 38
                        }
                      }
                    • operator: "="
                    • left: Identifier {...}
                      • type: "Identifier"
                      • start: 187
                      • end: 188
                      • loc: {...}
                        • start: {...}
                          • line: 12
                          • column: 2
                          }
                        • end: {...}
                          • line: 12
                          • column: 3
                          }
                        }
                      • name: "c"
                      }
                    • right: UnaryExpression {...}
                      • type: "UnaryExpression"
                      • start: 191
                      • end: 223
                      • loc: {...}
                        • start: {...}
                          • line: 12
                          • column: 6
                          }
                        • end: {...}
                          • line: 12
                          • column: 38
                          }
                        }
                      • operator: "+"
                      • prefix: true
                      • argument: CallExpression {...}
                        • type: "CallExpression"
                        • start: 192
                        • end: 223
                        • loc: {...}
                          • start: {...}
                            • line: 12
                            • column: 7
                            }
                          • end: {...}
                            • line: 12
                            • column: 38
                            }
                          }
                        • callee: MemberExpression {...}
                          • type: "MemberExpression"
                          • start: 192
                          • end: 220
                          • loc: {...}
                            • start: {...}
                              • line: 12
                              • column: 7
                              }
                            • end: {...}
                              • line: 12
                              • column: 35
                              }
                            }
                          • object: BinaryExpression {...}
                            • type: "BinaryExpression"
                            • start: 193
                            • end: 211
                            • loc: {...}
                              • start: {...}
                                • line: 12
                                • column: 8
                                }
                              • end: {...}
                                • line: 12
                                • column: 26
                                }
                              }
                            • left: BinaryExpression {...}
                              • type: "BinaryExpression"
                              • start: 194
                              • end: 199
                              • loc: {...}
                                • start: {...}
                                  • line: 12
                                  • column: 9
                                  }
                                • end: {...}
                                  • line: 12
                                  • column: 14
                                  }
                                }
                              • left: Literal {...}
                                • type: "Literal"
                                • start: 194
                                • end: 195
                                • loc: {...}
                                  • start: {...}
                                    • line: 12
                                    • column: 9
                                    }
                                  • end: {...}
                                    • line: 12
                                    • column: 10
                                    }
                                  }
                                • value: 5
                                • raw: "5"
                                }
                              • operator: "/"
                              • right: Literal {...}
                                • type: "Literal"
                                • start: 198
                                • end: 199
                                • loc: {...}
                                  • start: {...}
                                    • line: 12
                                    • column: 13
                                    }
                                  • end: {...}
                                    • line: 12
                                    • column: 14
                                    }
                                  }
                                • value: 9
                                • raw: "9"
                                }
                              }
                            • operator: "*"
                            • right: BinaryExpression {...}
                              • type: "BinaryExpression"
                              • start: 204
                              • end: 210
                              • loc: {...}
                                • start: {...}
                                  • line: 12
                                  • column: 19
                                  }
                                • end: {...}
                                  • line: 12
                                  • column: 25
                                  }
                                }
                              • left: Identifier {...}
                                • type: "Identifier"
                                • start: 204
                                • end: 205
                                • loc: {...}
                                  • start: {...}
                                    • line: 12
                                    • column: 19
                                    }
                                  • end: {...}
                                    • line: 12
                                    • column: 20
                                    }
                                  }
                                • name: "f"
                                }
                              • operator: "-"
                              • right: Literal {...}
                                • type: "Literal"
                                • start: 208
                                • end: 210
                                • loc: {...}
                                  • start: {...}
                                    • line: 12
                                    • column: 23
                                    }
                                  • end: {...}
                                    • line: 12
                                    • column: 25
                                    }
                                  }
                                • value: 32
                                • raw: "32"
                                }
                              }
                            }
                          • property: Identifier {...}
                            • type: "Identifier"
                            • start: 213
                            • end: 220
                            • loc: {...}
                              • start: {...}
                                • line: 12
                                • column: 28
                                }
                              • end: {...}
                                • line: 12
                                • column: 35
                                }
                              }
                            • name: "toFixed"
                            }
                          • computed: false
                          • optional: false
                          }
                        • arguments: [...] (1)
                          • Literal {...}
                            • type: "Literal"
                            • start: 221
                            • end: 222
                            • loc: {...}
                              • start: {...}
                                • line: 12
                                • column: 36
                                }
                              • end: {...}
                                • line: 12
                                • column: 37
                                }
                              }
                            • value: 1
                            • raw: "1"
                            }
                          ]
                        • optional: false
                        }
                      }
                    }
                  }
                ]
              }
            }
          ]
        • sourceType: "module"
        }
      • attributes: []
      }
    }
The AST is not public API and may change at any point in time
Temperature Converter • Playground • Svelte