PHP 8.2.31
Preview: tokenstream.rb Size: 644 B
/proc/thread-self/root/opt/alt/ruby18/lib64/ruby/1.8/rdoc/tokenstream.rb

# A TokenStream is a list of tokens, gathered during the parse
# of some entity (say a method). Entities populate these streams
# by being registered with the lexer. Any class can collect tokens
# by including TokenStream. From the outside, you use such an object
# by calling the start_collecting_tokens method, followed by calls
# to add_token and pop_token

module TokenStream
  def token_stream
    @token_stream
  end

  def start_collecting_tokens
    @token_stream = []
  end
  def add_token(tk)
    @token_stream << tk
  end
  def add_tokens(tks)
    tks.each  {|tk| add_token(tk)}
  end
  def pop_token
    @token_stream.pop
  end
end

Directory Contents

Dirs: 5 × Files: 7

Name Size Perms Modified Actions
dot DIR
- drwxr-xr-x 2024-03-03 22:48:17
Edit Download
- drwxr-xr-x 2024-03-03 22:48:17
Edit Download
markup DIR
- drwxr-xr-x 2024-03-03 22:48:17
Edit Download
parsers DIR
- drwxr-xr-x 2024-03-03 22:48:17
Edit Download
ri DIR
- drwxr-xr-x 2024-03-03 22:48:17
Edit Download
18.03 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download
11.91 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download
17.02 KB lrw-r--r-- 2008-01-11 01:24:05
Edit Download
8.40 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download
5.81 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download
644 B lrw-r--r-- 2007-02-12 23:01:19
Edit Download
4.97 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).