Exemple #1
0
 public void CheckForLineMarker(int line)
 {
     if (tokens.Count > 0 && tokens[0].IsTypeOf(TokenType.LINE_MARKER))
     {
         LineMarkers.AddLineMarker(tokens[0].ToString().Substring(1), line);
         tokens.RemoveAt(0);
     }
 }
Exemple #2
0
        private int GetLineJumpNumber(Token[] functionArguments)
        {
            string lineToJumpTo = functionArguments[0].ToString();


            bool validLineNumber = int.TryParse(lineToJumpTo, out int result);

            if (!validLineNumber)
            {
                result = LineMarkers.GetLineByMarker(lineToJumpTo);
            }

            return(result);
        }