Code Monkey home page Code Monkey logo

codemirror2-xquery's People

Contributors

0b10011 avatar amphro avatar coreh avatar ddnexus avatar espadrine avatar eustas avatar greengiant avatar gruehle avatar jankeromnes avatar jdleesmiller avatar komakino avatar ks-ifware avatar lm avatar marijnh avatar mbrevoort avatar misfo avatar mzero avatar page- avatar paulyg avatar peterkroon avatar sandeepshetty avatar saschpe avatar sborsje avatar steveohara avatar suor avatar timjb avatar treeform avatar vmx avatar vrana avatar whalefood avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

clockworked247

codemirror2-xquery's Issues

Syntax highlighting issue

let $rootfolder := "c:\builds\winnt\HEAD\qa\scripts"
let $keysfolder := concat($rootfolder, "keys")
return
$keysfolder

Thanks,
Scott D Brooks

Parser hangs browser when typing quotes with regex present

The issue was first reported when this XQuery code was being typed into QConsole:
fn:replace("^/([\w\d_-])/?(update|create|delete).?(\w)/?$"
--> add a second double quotes after fn:replace( and watch the browser lock

after some testing, I have simplified the symptom of the bug. Type the following:
type $
type "
browser will lock.

The offending line is the while loop on 297

// a variable may start with a quoted EQName so if the next character is quote, consume to the next quote
if(stream.eat(""")) {
while(stream.next() !== '"'){};

incorrect highlighting when xquery code wrapped inside xml node

The second through nth FLOWR statements are not highlighted correctly in the sample below.

xquery version "1.0-ml";
declare namespace bt="http://cerisent.com/bugtrack";
declare namespace local="local";
declare default collation "http://marklogic.com/collation/codepoint";

declare function local:asdf($name as xs:string, $parent-query as cts:query) {
for $ev in cts:element-values(xs:QName($name), (), (), $parent-query)
return element group {
attribute value {
$ev
},
cts:frequency($ev)
}
};
(:
{
local:asdf("bt:category", cts:and-query(()))
},
:)

{
let $q := cts:and-query((
cts:element-value-query(xs:QName("bt:submitted-by"), "jmakeig"),
cts:field-value-query("to-be-fixed-in-versions", "5.0-1"),
cts:element-value-query(xs:QName("bt:status"), ("new", "verify", "fix", "external"))
))
(: categories :)
for $c in cts:element-values(xs:QName("bt:category"), (), (), $q)
return {
let $q2 := cts:and-query((
$q,
cts:element-value-query(xs:QName("bt:category"), $c)
))
(: categories > versions :)
for $v in cts:field-values("to-be-fixed-in-versions", (), (), $q2)
return {
let $q3 := cts:and-query((
$q2,
cts:field-value-query("to-be-fixed-in-versions", $v)
))
(: categories > versions > assigned-to :)
for $at in cts:element-values(xs:QName("bt:assigned-to"), (), (), $q3)
return {
let $q4 := cts:and-query((
$q3,
cts:element-value-query(xs:QName("bt:assigned-to"), $at)
))
for $s in cts:element-values(xs:QName("bt:status"), (), (), $q4)
return {cts:frequency($s)}
}
}
}
}

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.