diff options
author | murphy <murphy@rubychan.de> | 2009-10-19 17:25:57 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2009-10-19 17:25:57 +0000 |
commit | 094616e18e4a0f441fe6f88c65dc1b86be5668d2 (patch) | |
tree | f785565c18598425c11ef52a39616531041f3db2 /test/scanners/python/import.expected.raydebug | |
parent | 98cd8c95c53d7865db469f742c541f274057770a (diff) | |
download | coderay-094616e18e4a0f441fe6f88c65dc1b86be5668d2.tar.gz |
Updated Python scanner (#41)
* Unicode support (kind of)
* [from ...] import ... as construct highlighted as :include
* added a test case for import statements
Diffstat (limited to 'test/scanners/python/import.expected.raydebug')
-rw-r--r-- | test/scanners/python/import.expected.raydebug | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/scanners/python/import.expected.raydebug b/test/scanners/python/import.expected.raydebug new file mode 100644 index 0000000..d9b7097 --- /dev/null +++ b/test/scanners/python/import.expected.raydebug @@ -0,0 +1,26 @@ +keyword(import) include(YourModule) comment(# Import the module into my package) + comment(# (does not import any of its symbols\)) + +keyword(import) include(YourModule) keyword(as) ident(Module) comment(# Use a different name for the module) + +keyword(from) include(YourModule) keyword(import) include(*) comment(# Import all module symbols not starting) + comment(# with an underscore (default\); if __all__) + comment(# is defined, only imports those symbols.) + comment(# Using this is discouraged unless the ) + comment(# module is specifically designed for it.) + +keyword(from) include(YourModule) keyword(import) include(name1)operator(,) include(name2)operator(,) include(xxx) + comment(# Import the named symbols from the module) + +keyword(from) include(YourModule) keyword(import) include(name1) keyword(as) ident(name2) + comment(# Import the named object, but use a) + comment(# different name to access it locally.) + +comment(#-----------------------------) +ident(__all__) operator(=) operator([)string<delimiter(")content(F1)delimiter(")>operator(,) string<delimiter(")content(F2)delimiter(")>operator(,) string<delimiter(")content(List)delimiter(")>operator(]) +comment(#-----------------------------) +ident(__all__) operator(=) operator([)string<delimiter(")content(Op_Func)delimiter(")>operator(,) string<delimiter(")content(Table)delimiter(")>operator(]) +comment(#-----------------------------) +keyword(from) include(YourModule) keyword(import) include(Op_Func)operator(,) include(Table)operator(,) include(F1) +comment(#-----------------------------) +keyword(from) include(YourModule) keyword(import) include(Functions)operator(,) include(Table)
\ No newline at end of file |