function FeedComment(feed = true)
{
	if (pos >= bufferSize)
	{
		return false;
	}

	let start = 0;
	let end   = bufferSize;



	let nextPos = (pos + 1);

	let name = Substring(buffer, pos, 1);
	let nextName = "";

	if (nextPos < bufferSize)
	{
		nextName = Substring(buffer, nextPos, 1);
	}



	if
	(
		(name == "/") &&
		(nextName == "/")
	)
	{
		start = pos;

		pos += 2;

		while (pos < bufferSize)
		{
			let nextPos = (pos + 1);

			let name = Substring(buffer, pos, 1);
			let nextName = "";

			if (nextPos < bufferSize)
			{
				nextName = Substring(buffer, nextPos, 1);
			}

			if
			(
				name.match(/\r/) &&
				nextName.match(/\n/)
			)
			{
				end = pos;

				break;
			}
			else if (name.match(/\n/))
			{
				end = pos;

				break;
			}

			pos++;
		}

		let size = (end - start);

		let comment = Substring(buffer, start, size);

		if (feed)
		{
			c += comment;
		}

		return true;
	}
	else if
	(
		(name == "/") &&
		(nextName == "*")
	)
	{
		start = pos;

		pos += 2;

		while (pos < bufferSize)
		{
			let nextPos = (pos + 1);

			let name = Substring(buffer, pos, 1);
			let nextName = "";

			if (nextPos < bufferSize)
			{
				nextName = Substring(buffer, nextPos, 1);
			}

			if
			(
				(name == "*") &&
				(nextName == "/")
			)
			{
				end = pos;

				break;
			}

			pos++;
		}

		let size = (end - start);

		let comment = Substring(buffer, start, size);

		if (feed)
		{
			c += comment;
		}

		return true;
	}

	return false;
}
// Returns true if a comment is found. Position will then be behind the comment.
Returns true if a comment is found. Position will then be behind the comment.
Returns true if a comment is found . Position will then be behind the comment .
function FeedComment(feed = true)
{
	if (pos >= bufferSize)
	{
		return false;
	}
	let start = 0;
	let end   = bufferSize;
	let nextPos = (pos + 1);
	let name = Substring(buffer, pos, 1);
	let nextName = "";
	if (nextPos < bufferSize)
	{
		nextName = Substring(buffer, nextPos, 1);
	}
	if
	(
		(name == "/") &&
		(nextName == "/")
	)
	{
		start = pos;
		pos += 2;
		while (pos < bufferSize)
		{
			let nextPos = (pos + 1);
			let name = Substring(buffer, pos, 1);
			let nextName = "";
			if (nextPos < bufferSize)
			{
				nextName = Substring(buffer, nextPos, 1);
			}
			if
			(
				name.match(/\r/) &&
				nextName.match(/\n/)
			)
			{
				end = pos;
				break;
			}
			else if (name.match(/\n/))
			{
				end = pos;
				break;
			}
			pos++;
		}
		let size = (end - start);
		let comment = Substring(buffer, start, size);
		if (feed)
		{
			c += comment;
		}
		return true;
	}
	else if
	(
		(name == "/") &&
		(nextName == "*")
	)
	{
		start = pos;
		pos += 2;
		while (pos < bufferSize)
		{
			let nextPos = (pos + 1);
			let name = Substring(buffer, pos, 1);
			let nextName = "";
			if (nextPos < bufferSize)
			{
				nextName = Substring(buffer, nextPos, 1);
			}
			if
			(
				(name == "*") &&
				(nextName == "/")
			)
			{
				end = pos;
				break;
			}
			pos++;
		}
		let size = (end - start);
		let comment = Substring(buffer, start, size);
		if (feed)
		{
			c += comment;
		}
		return true;
	}
	return false;
}
function FeedComment ( feed = true ) { if ( pos >= bufferSize ) { return false ; } let start = 0 ; let end = bufferSize ; let nextPos = ( pos + 1 ) ; let name = Substring ( buffer , pos , 1 ) ; let nextName = "" ; if ( nextPos < bufferSize ) { nextName = Substring ( buffer , nextPos , 1 ) ; } if ( ( name == "/" ) && ( nextName == "/" ) ) { start = pos ; pos += 2 ; while ( pos < bufferSize ) { let nextPos = ( pos + 1 ) ; let name = Substring ( buffer , pos , 1 ) ; let nextName = "" ; if ( nextPos < bufferSize ) { nextName = Substring ( buffer , nextPos , 1 ) ; } if ( name . match ( / \r / ) && nextName . match ( / \n / ) ) { end = pos ; break ; } else if ( name . match ( / \n / ) ) { end = pos ; break ; } pos ++ ; } let size = ( end - start ) ; let comment = Substring ( buffer , start , size ) ; if ( feed ) { c += comment ; } return true ; } else if ( ( name == "/" ) && ( nextName == "*" ) ) { start = pos ; pos += 2 ; while ( pos < bufferSize ) { let nextPos = ( pos + 1 ) ; let name = Substring ( buffer , pos , 1 ) ; let nextName = "" ; if ( nextPos < bufferSize ) { nextName = Substring ( buffer , nextPos , 1 ) ; } if ( ( name == "*" ) && ( nextName == "/" ) ) { end = pos ; break ; } pos ++ ; } let size = ( end - start ) ; let comment = Substring ( buffer , start , size ) ; if ( feed ) { c += comment ; } return true ; } return false ; }
Returns true if a comment is found.
Returns true if a comment is found .