Coder Social home page Coder Social logo

Comments (5)

bathos avatar bathos commented on May 22, 2024

Thank pucelle. I thought this was something that got fixed a while back, and when I test it Iā€™m getting the right behavior:

screen shot 2017-07-25 at 12 15 10 am

However it might be borked only in specific contexts. Can you provide a complete chunk which reproduces the problem?

from ecmascript-sublime.

pucelle avatar pucelle commented on May 22, 2024

Hi, Bathos.
Sorry for reply you late.
Here is code that cant work with my sublime:

Watcher.prototype = {
	get () {
		let oldDeps = this.deps
		let newDeps = this.deps = Object.create(null)

		runningWatcher = this
		let value = this.getter.call(this.vm[proxySymbol])
		runningWatcher = null

		for (let key in oldDeps) {
			let oldObserver = oldDeps[key]
			if (!newDeps[key]) {
				oldObserver.removeWatcher(key, this)
			}
		}

		return value
	},
	set (value) {
		let {vm, exp, writeVM, setter} = this

		if (!writeVM) {
			let firstProp = lexer.getFirstProperty(exp)
			writeVM = this.writeVM = this.findWriteVM(vm, firstProp)
		}

		if (!setter) {
			setter = this.setter = lexer.compileWritter(exp)
		}
		
		setter.call(vm, writeVM[proxySymbol], value)
	},
}

from ecmascript-sublime.

pucelle avatar pucelle commented on May 22, 2024

Here is the screenshot:
get-set

from ecmascript-sublime.

bathos avatar bathos commented on May 22, 2024

That appears to be a different syntax definition for JS, not ES sublime. The scoping throughout that screenshot is not consistent with this library.

(Some of the clues: vm is not a specially scoped identifier in ES Sublime; properties being assigned are not scoped different from properties not being assigned in ES Sublime unless the RHS is a function; inconsistent highlighting of let, etc.)

If you can confirm this is using ES Sublime and things are just really wonky, feel free to re-open.

from ecmascript-sublime.

pucelle avatar pucelle commented on May 22, 2024

Hi, Bathos:
After checked my syntax config in Sublime, I did choose the "JavaScript" as syntax, not 'EcmaScript'.
Sorry for the trouble I made.

from ecmascript-sublime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.