diff options
| author | Andi Gutmans <andi@php.net> | 2002-03-02 20:38:52 +0000 |
|---|---|---|
| committer | Andi Gutmans <andi@php.net> | 2002-03-02 20:38:52 +0000 |
| commit | b90d80b58806083ded586da0745f02b38d301819 (patch) | |
| tree | 052b205bd3fb76749def1abdfd3094fd022279aa /Zend/zend_language_scanner.l | |
| parent | bc7e0b55121755e35e1a659e1d82822e3b7fcde8 (diff) | |
| download | php-git-b90d80b58806083ded586da0745f02b38d301819.tar.gz | |
- Initial patch to support importing from class scopes (for Stig).
- It isn't complete yet but I want to work on it from another machine. It
- shouldn't break anything else so just don't try and use it.
- The following is a teaser of something that already works:
<?php
class MyClass
{
function hello()
{
print "Hello, World\n";
}
class MyClass2
{
function hello()
{
print "Hello, World in MyClass2\n";
}
}
}
import function hello, class MyClass2 from MyClass;
MyClass2::hello();
hello();
?>
Diffstat (limited to 'Zend/zend_language_scanner.l')
| -rw-r--r-- | Zend/zend_language_scanner.l | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index 16ad7d8c82..d3b2f03c4e 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -669,6 +669,14 @@ NEWLINE ("\r"|"\n"|"\r\n") return T_INCLUDE; } +<ST_IN_SCRIPTING>"import" { + return T_IMPORT; +} + +<ST_IN_SCRIPTING>"from" { + return T_FROM; +} + <ST_IN_SCRIPTING>"include_once" { return T_INCLUDE_ONCE; } |
