-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathjs2ruby.udl
More file actions
39 lines (30 loc) · 1.24 KB
/
js2ruby.udl
File metadata and controls
39 lines (30 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# js2ruby.udl
# Transition from JavaScript strings into django code blocks
#
# Copyright (c) 2006-2011 ActiveState Software Inc.
# See the file LICENSE.txt for licensing information.
#
# Authors:
# Eric Promislow <ericp@activestate.com>
family csl
state IN_CSL_DSTRING:
/<%=?/ : paint(upto, CSL_STRING), paint(include, TPL_OPERATOR), \
spush_check(IN_CSL_DSTRING) => IN_SSL_DEFAULT
state IN_CSL_SSTRING:
/<%=?/ : paint(upto, CSL_STRING), paint(include, TPL_OPERATOR), \
spush_check(IN_CSL_SSTRING) => IN_SSL_DEFAULT
state IN_CSL_DEFAULT:
/<%=?/ : paint(upto, CSL_DEFAULT), paint(include, TPL_OPERATOR), \
spush_check(IN_CSL_DEFAULT) => IN_SSL_DEFAULT
state IN_CSL_COMMENT_1:
/<%=?/ : paint(upto, CSL_COMMENTBLOCK), paint(include, TPL_OPERATOR), \
spush_check(IN_CSL_COMMENT_1) => IN_SSL_DEFAULT
# This one can be completely wrong, because we don't know how many lines of code
# the PHP expression will return, but we have the same problem with strings, so
# we'll do it anyway.
state IN_CSL_COMMENT_LINE_1:
/<%=?/ : paint(upto, CSL_COMMENT), paint(include, TPL_OPERATOR), \
spush_check(IN_CSL_COMMENT_LINE_1) => IN_SSL_DEFAULT
state IN_CSL_REGEX:
/<%=?/ : paint(upto, CSL_REGEX), paint(include, TPL_OPERATOR), \
spush_check(IN_CSL_REGEX) => IN_SSL_DEFAULT