瀏覽代碼

Fixed monkeydocs being commented out with ' char!

Mark Sibly 7 年之前
父節點
當前提交
a12f887b75
共有 3 個文件被更改,包括 10 次插入4 次删除
  1. 2 1
      src/mx2cc/mx2cc.monkey2
  2. 5 3
      src/mx2cc/parser.monkey2
  3. 3 0
      src/mx2cc/toker.monkey2

+ 2 - 1
src/mx2cc/mx2cc.monkey2

@@ -22,7 +22,8 @@ Global opts_time:Bool
 
 Global StartDir:String
 
-Const TestArgs:="mx2cc makemods"' -clean mojo"
+'Const TestArgs:="mx2cc makemods"' -clean mojo"
+Const TestArgs:="mx2cc makedocs std"
  
 'Const TestArgs:="mx2cc makeapp src/mx2cc/test.monkey2"
 

+ 5 - 3
src/mx2cc/parser.monkey2

@@ -2060,7 +2060,6 @@ Class Parser
 				
 				Continue
 				
-'			Else If _ccnest<>_ifnest
 			Else If _cc.Top<>1
 			
 				Local pos:=_toker.LinePos
@@ -2069,7 +2068,10 @@ Class Parser
 					_toker.Bump()
 				Wend
 				
-				If _doccing _docs.Push( _toker.Text.Slice( pos,_toker.TokePos ) )
+				If _doccing
+					Local text:=_toker.Text.Slice( pos,_toker.TokePos )
+					_docs.Push( text )
+				Endif
 
 				Continue
 				
@@ -2286,7 +2288,7 @@ Class Parser
 				
 			Case "rem"
 			
-				If _cc.Top=1 And p.Bump()="monkeydoc"
+				If _cc.Top=1 And p.Bump()="monkeydoc" And Builder.opts.makedocs
 
 					Local qhelp:=p._toker.Text.Slice( p._toker.TokePos+9 ).Trim()
 					_docs.Clear()

+ 3 - 0
src/mx2cc/toker.monkey2

@@ -253,6 +253,7 @@ Class Toker
 			While _pos<_len And _text[_pos]<>CHAR_EOL
 				_pos+=1
 			Wend
+			
 			If _pos<_len
 				_pos+=1
 				_linePos=_pos
@@ -268,6 +269,8 @@ Class Toker
 			While _pos<_len And _text[_pos]<>CHAR_EOL
 				_pos+=1
 			Wend
+			
+			_tokePos=_pos
 
 			If _pos<_len
 				_pos+=1