more minor tidying

pull/1839/head
Rich Harris 7 years ago
parent a09dc36ea5
commit f33c5ee8d2

@ -68,7 +68,6 @@ export default class Component {
module_script: Node; module_script: Node;
imports: Node[] = []; imports: Node[] = [];
hasComponents: boolean;
module_javascript: string; module_javascript: string;
javascript: string; javascript: string;
@ -90,18 +89,18 @@ export default class Component {
file: string; file: string;
locate: (c: number) => { line: number, column: number }; locate: (c: number) => { line: number, column: number };
// TODO this does the same as component.locate! remove one or the other
locator: (search: number, startIndex?: number) => {
line: number,
column: number
};
stylesheet: Stylesheet; stylesheet: Stylesheet;
userVars: Set<string> = new Set(); userVars: Set<string> = new Set();
templateVars: Map<string, string> = new Map(); templateVars: Map<string, string> = new Map();
aliases: Map<string, string> = new Map(); aliases: Map<string, string> = new Map();
usedNames: Set<string> = new Set(); usedNames: Set<string> = new Set();
init_uses_self = false;
locator: (search: number, startIndex?: number) => {
line: number,
column: number
};
constructor( constructor(
ast: Ast, ast: Ast,

@ -28,8 +28,6 @@ export default class EventHandler extends Node {
this.expression = new Expression(component, this, template_scope, info.expression); this.expression = new Expression(component, this, template_scope, info.expression);
this.usesContext = this.expression.usesContext; this.usesContext = this.expression.usesContext;
} else { } else {
component.init_uses_self = true;
const name = component.getUniqueName(`${this.name}_handler`); const name = component.getUniqueName(`${this.name}_handler`);
component.declarations.push(name); component.declarations.push(name);

@ -25,8 +25,6 @@ export default class InlineComponent extends Node {
component.template_references.add(info.name); component.template_references.add(info.name);
} }
component.hasComponents = true;
this.name = info.name; this.name = info.name;
this.expression = this.name === 'svelte:component' this.expression = this.name === 'svelte:component'

@ -272,7 +272,6 @@ function getValueFromDom(
if (name === 'group') { if (name === 'group') {
const bindingGroup = getBindingGroup(renderer, binding.node.expression.node); const bindingGroup = getBindingGroup(renderer, binding.node.expression.node);
if (type === 'checkbox') { if (type === 'checkbox') {
renderer.component.init_uses_self = true;
return `@getBindingGroupValue($$self.$$.binding_groups[${bindingGroup}])`; return `@getBindingGroupValue($$self.$$.binding_groups[${bindingGroup}])`;
} }

Loading…
Cancel
Save