MLstate / opalang

The Opa Language for Web Application Development
http://opalang.org
Other
1.24k stars 125 forks source link

Compilation error , static resources #180

Closed nitrox62 closed 9 years ago

nitrox62 commented 9 years ago

![Uploading Capture d’écran 2015-03-19 à 19.19.16.png . . .]()

Error: File "salut.opa", line 37, characters 0-0, (37:0-37:0 | 704-704) Syntax error The error may be in the following citation, usually in the red part (starting at ⚐) or just before:

}

Server.start(Server.http, {title: "Jeu du plus et du moins", page: page} ⚐[ {resources: @static_include_directory("resources")}, {register: {css:["/resources/style-1.css"]}},

]

) Hint: expected "" or "&" or ")" or "," or "<" or "=" or "?" or "@" or "as" or "|" or "||" or or (while parsing <expression unary '-'> starting at line 36, column 41) Hint: The body, found at (26:2-26:5), might be open

Anyone has an idea? When I delete the resources at the end , all is ok .

HenriChataing commented 9 years ago

You are missing a comma after the {title: ..} record.

2015-03-19 19:16 GMT+01:00 nitrox62 notifications@github.com:

import stdlib.themes.bootstrap.{css, icons, responsive} function show(secret, _){ guess =String.to_int(Dom.get_value(#guess)); message = if (guess==secret) { Bravo! < /span> } else if (guessPlus</>} else {<>Moins</>};

message = message;

}

function page(){

secret = 1 + Random.int(100);

Trouvez le nombre entre 1 et 100 auquel je pense

Vérifier</>

}

Server.start(Server.http, {title: "Jeu du plus et du moins", page: page} [ {resources: @static_include_directory("resources")}, {register: {css:["/resources/style-1.css"]}},

]

);

Error: File "salut.opa", line 37, characters 0-0, (37:0-37:0 | 704-704) Syntax error The error may be in the following citation, usually in the red part (starting at ⚐) or just before:

}

Server.start(Server.http, {title: "Jeu du plus et du moins", page: page} ⚐[ {resources: @static_include_directory("resources")}, {register: {css:["/resources/style-1.css"]}},

]

) Hint: expected "" or "&" or ")" or "," or "<" or "=" or "?" or "@" or "as" or "|" or "||" or or (while parsing starting at line 36, column 41) Hint: The body, found at (26:2-26:5), might be open

Anyone has an idea? When I delete the resources at the end , all is ok .

— Reply to this email directly or view it on GitHub https://github.com/MLstate/opalang/issues/180.

nitrox62 commented 9 years ago

Ok I am at a conférence I will look mater.thank you

hbbio commented 9 years ago

This is not an issue.