regex - How to get token before dot('.') at current cursor postion in javascript for autocompletion in codemirror editor? -


function (editor, currentpos) {     return editor.gettokenat(currentpos); } 

i designing code editor custom language. so, want autocompletion based on mode state. want token before . when press ctrl + space during hello. then, method should give me hello can suggest properties related it. how can this?

the javascript-hint addon this, continuing previous token in loop until finds not property. want code looks similar.


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -