Fork me on GitHub

Nested comments and XML literals

578 bytes of Scala by mark

123456789101112131415161718192021222324252627282930313233343536373839
// code-examples/XML/reading/inline-script.scala

import scala.xml._

val someXML =
<sammich>
  <bread>wheat</bread>
  <meat>salami</meat>
  <condiments>
    <condiment expired="true">mayo</condiment>
    <condiment expired="false">mustard</condiment>
  </condiments>
 // not scala
</sammich> // back to scala

0;
21;
0xFFFFFFFF;
0777L;

0.0;
1e30f;
3.14159f;
1.0e-100;
.1


// this is a comment 123;
123; 
/* this is a comment 123; */
123;
/* this is a /* nested 123; */ comment  123;*/
123;
/* this is also a 123;
  // /* 123;
  nested */ 123;
  /*  comment */ 123;
  */ 
123;