Exemple #1
0
 private static void updateChecksum(Checksum checksum, int value)
 {
     checksum.Update((value) & 0xFF);
     checksum.Update((int)((uint)value >> 8) & 0xFF);
     checksum.Update((int)((uint)value >> 16) & 0xFF);
     checksum.Update((int)((uint)value >> 24) & 0xFF);
 }
Exemple #2
0
        private static void updateChecksum(Checksum checksum, IToken token)
        {
            if (token == null)
            {
                checksum.Update(0);
                return;
            }

            updateChecksum(checksum, token.StartIndex);
            updateChecksum(checksum, token.StopIndex);
            updateChecksum(checksum, token.Line);
            updateChecksum(checksum, token.Column);
            updateChecksum(checksum, token.Type);
            updateChecksum(checksum, token.Channel);
        }
        private static void updateChecksum(Checksum checksum, IToken token)
        {
            if (token == null)
            {
                checksum.Update(0);
                return;
            }

            updateChecksum(checksum, token.StartIndex);
            updateChecksum(checksum, token.StopIndex);
            updateChecksum(checksum, token.Line);
            updateChecksum(checksum, token.Column);
            updateChecksum(checksum, token.Type);
            updateChecksum(checksum, token.Channel);
        }
Exemple #4
0
 public void VisitTerminal(ITerminalNode node)
 {
     checksum.Update(VISIT_TERMINAL);
     updateChecksum(checksum, node.Symbol);
 }
 private static void updateChecksum(Checksum checksum, int value)
 {
     checksum.Update((value) & 0xFF);
     checksum.Update((int)((uint)value >> 8) & 0xFF);
     checksum.Update((int)((uint)value >> 16) & 0xFF);
     checksum.Update((int)((uint)value >> 24) & 0xFF);
 }