Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. Parser testcases
  2. ================
  3.  
  4. Format
  5. ------
  6.  
  7. #data
  8. <css source data>
  9. #errors
  10. <list of expected errors, with line/col offsets> (ignored at present)
  11. #expected
  12. <rule list, as below>
  13. #reset
  14.  
  15. Format of rule list
  16. -------------------
  17.  
  18.   line     ::= rule | bytecode
  19.   rule     ::= '| ' type ' '+ name
  20.   name     ::= .+
  21.   type     ::= [0-9]+
  22.   bytecode ::= '|  ' ' '* hexnum (' '+ (hexnum | ptr))*
  23.   hexnum   ::= '0x' [0-9a-fA-F]+
  24.   ptr      ::= 'PTR(' .* ')'
  25.  
  26. Type corresponds to css_rule_type. Consult the library sources for the values.
  27.  
  28. Bytecode may be split over multiple lines for readability. All bytecode is
  29. associated with the most-recently-declared rule. Consult the bytecode
  30. documentation for what the hexnums should be representing.
  31.  
  32. Example
  33. -------
  34.  
  35. #data
  36. * { color: #ff0000; background-image: url("foo.png"); }
  37. #errors
  38. #expected
  39. | 1 *
  40. |   0x0200000f 0xff000000
  41. |   0x02000003 PTR(foo.png)
  42. #reset
  43.  
  44. TODO
  45. ----
  46.  
  47.   + Permit nesting of rules (for nested block support)
  48.  
  49.