Multiline Strings

Florian Bösch pyalot at
Sat Mar 8 03:41:20 PST 2014

On Fri, Mar 7, 2014 at 8:52 PM, Peter van der Zee <ecma at> wrote:

> I think you want to take a look at "source maps". They're specifically
> designed to deal with this problem.

The problem is that a function like compileShader would look like this:

var compileShader(source){
   var shader = gl.createShader(gl.VERTEX_SHADER);
   gl.shaderSource(shader, source);
     var error = glGetShaderInfoLog(shader);
     // now what?

     // need file of source

     // need lines # of source


And you'd do things like:

var source = """
   void main(){
      gl_FragColor = whatever;

I don't see how source maps help either.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list